|
Lines 1720-1725
static struct pid {
|
Link Here
|
|---|
|
int pid; | int pid; |
} *pidlist; | } *pidlist; |
| |
|
static struct sigaction *old_alarm= NULL; /* XXX horrible awful hack */ |
|
|
pointer | pointer |
Popen(char *command, char *type) | Popen(char *command, char *type) |
{ | { |
|
Lines 1741-1751
Popen(char *command, char *type)
|
Link Here
|
|---|
|
return NULL; | return NULL; |
} | } |
| |
|
/* Ignore the smart scheduler while this is going on */ |
|
sigaction(SIGALRM, SIG_IGN, old_alarm); |
|
|
switch (pid = fork()) { | switch (pid = fork()) { |
case -1: /* error */ | case -1: /* error */ |
close(pdes[0]); | close(pdes[0]); |
close(pdes[1]); | close(pdes[1]); |
xfree(cur); | xfree(cur); |
|
sigaction(SIGALRM, old_alarm, NULL); |
return NULL; | return NULL; |
case 0: /* child */ | case 0: /* child */ |
if (setgid(getgid()) == -1) | if (setgid(getgid()) == -1) |
|
Lines 1921-1926
Pclose(pointer iop)
|
Link Here
|
|---|
|
/* allow EINTR again */ | /* allow EINTR again */ |
OsReleaseSignals (); | OsReleaseSignals (); |
| |
|
sigaction(SIGALRM, old_alarm,NULL); |
|
|
return pid == -1 ? -1 : pstat; | return pid == -1 ? -1 : pstat; |
} | } |
| |