Open GoogleCodeExporter opened 9 years ago
In several emu/*/os.c (most of the *nix except MacOSX, Solaris, and Unixware at
1st look), the function "cleanexit" does a "kill(0, SIGKILL)" before calling
"exit(0)".
I'm afraid to remove the "kill(0, SIGKILL)" w/o understanding why it's there,
but I believe that's the reason why the "Killed" message appears.
Original comment by joseph.s...@gmail.com
on 7 Jun 2013 at 3:44
That is the reason for the message, but at the moment the kill is needed to
shut down the various processes (eg, running kprocs) without having to
enumerate them
(which would be fairly involved, and anyway, this is a good use of a process
group).
Cleanexit sends the signal to the process group. The cleanexit function is not
necessarily
called in the process for which the shell is waiting, so that process is hit by
the SIGKILL, and the shell prints the diagnostic. Something along those lines.
Original comment by Charles....@gmail.com
on 7 Jun 2013 at 3:50
I understand Alex' issue with this, as I too will use emu inside shell scripts
and the "Killed" message makes things a bit messy at the console.
It also makes sense to not clutter up the code with kproc tracking details for
such a minor issue.
Is the lack of "kill(0, SIGKILL)" in the other *nix platforms an oversight or
by design?
I will research if there are any clever ways to suppress the SIGKILL message.
Original comment by joseph.s...@gmail.com
on 7 Jun 2013 at 6:48
Oh, I quite agree with you about the messiness. I was just explaining what it
was doing, not suggesting that was the way it ought to be left.
Also, nearly all the Unix platforms (I thought it was all of them) have kill(0,
SIGKILL) or an equivalent. Try cd emu; grep SIGKILL */os.c
Original comment by Charles....@gmail.com
on 7 Jun 2013 at 9:04
Original issue reported on code.google.com by
powerman...@gmail.com
on 17 Jun 2012 at 5:18