Bug #1551 ยป rogue.diff
games/rogue/machdep.c | ||
---|---|---|
void
|
||
md_shell(const char *shell)
|
||
{
|
||
long w[2];
|
||
if (!fork()) {
|
||
int w;
|
||
pid_t pid;
|
||
pid = fork();
|
||
switch (pid) {
|
||
case -1:
|
||
break;
|
||
case 0:
|
||
/* revoke */
|
||
setgid(getgid());
|
||
execl(shell, shell, NULL);
|
||
execl(shell, shell, (char *)NULL);
|
||
_exit(255);
|
||
default:
|
||
waitpid(pid, &w, 0);
|
||
break;
|
||
}
|
||
wait((int *)w);
|
||
}
|
||
#endif /* UNIX */
|