Le septidi 7 thermidor, an CCXXIII, Ganesh Ajjanagadde a écrit :
> >> -        write(2/*STDERR_FILENO*/, "Received > 3 system signals, hard 
> >> exiting\n",
> >> +        num_write = write(2/*STDERR_FILENO*/, "Received > 3 system 
> >> signals, hard exiting\n",
> >>                             strlen("Received > 3 system signals, hard 
> >> exiting\n"));
> >> -
> >> +        if(num_write < 0)
> >> +            perror("write");

> Ok. How about making this errno set by write (if any) become part of
> the exit code, e.g by or'ing?
> As it stands, the 123 in the exit status sounds quite arbitrary, so
> this should be ok,
> and gives the parent a chance to distinguish between the two cases.

IMHO, you are wasting your time here: this error message is not important,
it is only for people who did not notice they had the elbow on the Ctrl key
while their cat was pawing the C key.

More seriously: this message is for informing human users that the reason
for stopping is three signals. The 123 return code is for informing the
parent process of the same condition. They are entirely redundant
(especially with a good shell that has an option to print the error code of
a failed command), and the exit code can not fail. Therefore, we really do
not care if writing the error message fails.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to