Thread View: net.eunice
1 messages
1 total messages
Started by Don Libes
Sun, 19 May 1985 00:12
_exit or exit following fork?
Author: Don Libes
Date: Sun, 19 May 1985 00:12
Date: Sun, 19 May 1985 00:12
23 lines
1460 bytes
1460 bytes
I've been hacking on news 2.10.2 and I have one problem I don't know
what to do with. In visual.c there is a routine called prun() that
actually performs the fork&exec's to do mail, followups and random
shell commands. I've extracted the part that is pertinent:
prun()
{
if ((pid = fork()) == 0) {
/* exec */ /* child */
exit(-1);
} else wait(pid); /* parent */
}
If I run this piece of code, the parent gets totally screwed up. If I
change the exit to _exit, it works fine!
All I can conjecture is that the fork is doing a vfork and the exit()
is closing some of the parents fds. If I actually exec something in
the fork, however, ps says a new process really does exist. In any
case, the exec'd process itself terminates with an exit, so once again,
my process gets screwed. Any ideas?
Don Libes {seismo,umcp-cs}!nbs-amrf!libes
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads