IPC test set fixes:
- restore original UID before deleting test directory - do not assume that SIGUSR1 signal is set to default action
This commit is contained in:
parent
e42952c93f
commit
f23a37e10f
4 changed files with 6 additions and 0 deletions
|
@ -182,6 +182,7 @@ cleanup(void)
|
|||
rm_sema(sem_id_1);
|
||||
|
||||
/* Remove the temporary directory */
|
||||
seteuid(getuid());
|
||||
tst_rmdir();
|
||||
|
||||
/*
|
||||
|
|
|
@ -209,6 +209,7 @@ cleanup(void)
|
|||
rm_sema(sem_id_2);
|
||||
|
||||
/* Remove the temporary directory */
|
||||
seteuid(getuid());
|
||||
tst_rmdir();
|
||||
|
||||
/*
|
||||
|
|
|
@ -79,6 +79,8 @@ int main(void)
|
|||
|
||||
key = (key_t) getpid() ;
|
||||
|
||||
signal(SIGUSR1, SIG_DFL);
|
||||
|
||||
sigemptyset(&sigset);
|
||||
sigaddset(&sigset,SIGUSR1);
|
||||
sigprocmask(SIG_BLOCK,&sigset,NULL);
|
||||
|
|
|
@ -79,6 +79,8 @@ int main(void)
|
|||
|
||||
key = (key_t)getpid() ;
|
||||
|
||||
signal(SIGUSR1, SIG_DFL);
|
||||
|
||||
sigemptyset(&sigset);
|
||||
sigaddset(&sigset,SIGUSR1);
|
||||
sigprocmask(SIG_BLOCK,&sigset,NULL);
|
||||
|
|
Loading…
Reference in a new issue