8000 minix/test/t60b.c at R3.2.0 · mion/minix · GitHub
[go: up one dir, main page]

Skip to content
8000

Latest commit

 

History

History
23 lines (19 loc) · 405 Bytes

t60b.c

File metadata and controls

23 lines (19 loc) · 405 Bytes
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv)
{
/* Return the tainted state of our child to our parent */
pid_t childpid;
int status;
childpid = fork();
if (childpid == (pid_t) -1) exit(-2);
else if (childpid == 0) {
exit(issetugid());
} else {
wait(&status);
}
return(WEXITSTATUS(status));
}
0