[PATCH] fsck: Fix incorrect handling of child exit

dietmar.schindler at manroland-web.com dietmar.schindler at manroland-web.com
Fri May 25 08:18:25 UTC 2018


> -----Original Message-----
> From: busybox [mailto:busybox-bounces at busybox.net] On Behalf Of Niklas Hambüchen
> Sent: Thursday, May 24, 2018 9:51 PM
>
>> The way you do it now, using WEXITSTATUS in all cases where it's not WIFSIGNALED, makes the
> assumption that WIFSIGNALED is the precise inverse of WIFEXITED.
>
> But I haven't found the glibc (API) to make that guarantee anywhere.

There's, among other cases, this paragraph in The Open Group Base Specification http://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html:

"If the information pointed to by stat_loc was stored by a call to waitpid() that did not specify the WUNTRACED or WCONTINUED flags, or by a call to the wait() function, exactly one of the macros WIFEXITED(*stat_loc) and WIFSIGNALED(*stat_loc) shall evaluate to a non-zero value."
--
Best regards,
Dietmar Schindler
________________________________
manroland web systems GmbH | Managing Director: Alexander Wassermann
Registered Office: Augsburg | Trade Register: AG Augsburg | HRB-No.: 26816 | VAT: DE281389840

Confidentiality note:
This eMail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you have received this eMail in error, then please delete this eMail.
________________________________


More information about the busybox mailing list