* Julien BLACHE <jbla...@debian.org>, 2010-09-09, 19:22:
scanadf sets SIGCHLD to SIG_IGN just before calling fork() and
execle().  This action will be inherited by child processes on Linux
and Hurd systems (though, apparently, not on kFreeBSD). This is
certainly undesired behaviour, and breaks every program that expect
this signal action to be set reasonably at startup (e.g. Python
programs using the subprocess module).

Such programs are broken already; if you require some specific
behaviour, you have to take the steps to ensure your environment is set
up to your expectations.

ISTR seeing this discussed as a Python bug.

True, I will file a separate bug against Python. However, according to POSIX, “many existing applications wrongly assume that they start with certain signals set to the default action and/or unblocked. […] Therefore, it is best not to block or ignore signals across execs without explicit reason to do so […].”

That being said, the patch looks good.

The attached (untested) patch should fix this bug.

Have you actually run into an issue with the current behaviour?

I didn't (I don't even have a scanner), but a user one of my programs complained that it didn't work when run under scanadf. Explicitly setting SIGCHLD to SIG_DFL (in my program) fixed the issue for him.

--
Jakub Wilk

Attachment: signature.asc
Description: Digital signature

Reply via email to