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:
David van Moolenbroek 2010-01-26 08:05:33 +00:00
parent e42952c93f
commit f23a37e10f
4 changed files with 6 additions and 0 deletions

View file

@ -182,6 +182,7 @@ cleanup(void)
rm_sema(sem_id_1);
/* Remove the temporary directory */
seteuid(getuid());
tst_rmdir();
/*

View file

@ -209,6 +209,7 @@ cleanup(void)
rm_sema(sem_id_2);
/* Remove the temporary directory */
seteuid(getuid());
tst_rmdir();
/*

View file

@ -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);

View file

@ -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);