On Wed, Nov 11, 2020 at 08:50:27PM -0600, Derek Martin wrote:
> On Wed, Nov 11, 2020 at 02:34:57PM -0600, Derek Martin wrote:
> background.c:
>   background_edit_landing_page() has this code:
> 
>     while (!done)
>     {
>       wait_rc = waitpid (bg_pid, NULL, WNOHANG);
>       if ((wait_rc > 0) ||
>           ((wait_rc < 0) && (errno == ECHILD)))
>       {
>         rc = 0;
>         break;
>       }
>     ...
> 
>   Checking for ECHILD is unnecessary if children are handled properly.

Ugh.  FWIW this also may not be quite right...  I originally had some
additional text intended to clarify that, but it got chopped as I
edited because the message was already so ridiculously long.  This may
well be right, if you have some expectation that the process SHOULD
still be running...  I didn't read enough of the background editing
code to get a good sense of that.  At any rate, the discussion after
that outlined why checking for ECHILD is probably a mistake in most
contexts, even if it is not in this specific instance.


-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.

Attachment: signature.asc
Description: PGP signature

Reply via email to