Re: How to report a death by signal ?

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Wed, 18 Feb 2015 14:20:38 +0100

On 18/02/2015 14:04, Olivier Brunel wrote:
> I don't follow, what's wrong with using a fd?

  It needs a convention between G and P. And I can't do that, because
G and P are not necessarily both execline commands. They are normal
Unix programs, and the whole point of execline is to have commands
that work transparently in any environment, with only the Unix argv
and envp as conventions.


> Cause that was my idea as well: return the exit code or 255.

  I was considering it for a while, then figured that the signal number
is an interesting information to have, if G remotely cares about
C crashing. I prefer to reserve the whole range of 128+ for
"something went very wrong, most likely a crash at some point, and
if you get 129+, it was directly below you and you get the signal
number".


> Though if you want "shell compatibility" you could also have an option
> to return exit code, or 128+signum when signaled, and similarly one
> would either be fine with that, or have to use the fd for full/complete
> info.

  Programs that can establish a convention between one another are easy
to deal with. If I remember to document the convention (finish scripts
*whistle*)

-- 
  Laurent
Received on Wed Feb 18 2015 - 13:20:38 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC