|
Lines 1725-1730
Link Here
|
| 1725 |
int pid; |
1725 |
int pid; |
| 1726 |
} *pidlist; |
1726 |
} *pidlist; |
| 1727 |
|
1727 |
|
|
|
1728 |
static sighandler_t old_alarm = NULL; /* XXX horrible awful hack */ |
| 1729 |
|
| 1728 |
pointer |
1730 |
pointer |
| 1729 |
Popen(char *command, char *type) |
1731 |
Popen(char *command, char *type) |
| 1730 |
{ |
1732 |
{ |
|
Lines 1746-1756
Link Here
|
| 1746 |
return NULL; |
1748 |
return NULL; |
| 1747 |
} |
1749 |
} |
| 1748 |
|
1750 |
|
|
|
1751 |
/* Ignore the smart scheduler while this is going on */ |
| 1752 |
old_alarm = signal(SIGALRM, SIG_IGN); |
| 1753 |
|
| 1749 |
switch (pid = fork()) { |
1754 |
switch (pid = fork()) { |
| 1750 |
case -1: /* error */ |
1755 |
case -1: /* error */ |
| 1751 |
close(pdes[0]); |
1756 |
close(pdes[0]); |
| 1752 |
close(pdes[1]); |
1757 |
close(pdes[1]); |
| 1753 |
xfree(cur); |
1758 |
xfree(cur); |
|
|
1759 |
signal(SIGALRM, old_alarm); |
| 1754 |
return NULL; |
1760 |
return NULL; |
| 1755 |
case 0: /* child */ |
1761 |
case 0: /* child */ |
| 1756 |
if (setgid(getgid()) == -1) |
1762 |
if (setgid(getgid()) == -1) |
|
Lines 1926-1931
Link Here
|
| 1926 |
/* allow EINTR again */ |
1932 |
/* allow EINTR again */ |
| 1927 |
OsReleaseSignals (); |
1933 |
OsReleaseSignals (); |
| 1928 |
|
1934 |
|
|
|
1935 |
signal(SIGALRM, old_alarm); |
| 1936 |
|
| 1929 |
return pid == -1 ? -1 : pstat; |
1937 |
return pid == -1 ? -1 : pstat; |
| 1930 |
} |
1938 |
} |
| 1931 |
|
1939 |
|