|
|
1.1 root 1: #include "trek.h"
2: /**
3: ** call the shell
4: **/
5:
6: shell()
7: {
8: int i;
9: register int pid;
10: register int oldsig, oldqit;
11:
12: if (!(pid = fork()))
13: {
14: setuid(getuid());
15: nice(0);
16: signal(SIGINT, 0);
17: execl("/bin/sh", "-", 0);
18: syserr("cannot execute /bin/sh");
19: }
20: oldsig=signal(2,1); oldqit=signal(3,1);
21: while (wait(&i) != pid) ;
22: printf("trek!\n");
23: signal(2,oldsig); signal(3,oldqit);
24: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.