[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: on interrupt, xargs does not wait for subprocess to exit

From: James Youngman
Subject: Re: on interrupt, xargs does not wait for subprocess to exit
Date: Sun, 25 Oct 2015 20:07:53 +0000

On Fri, Aug 28, 2015 at 6:24 AM,  <address@hidden> wrote:
> I guess if xargs were to trap SIGINT and defer exiting, then it would
> end up waiting for its sub-process to die, which should happen soon
> anyway because the sub-process also receives SIGINT.

They could have blocked (or handled and ignored) it.   Indeed, there
is no guaranteeing that any of xargs' children will exit at all.

>  I wonder if such
> behavior would ever be objectionable. Perhaps it is not of great
> importance to many people.

My reading of 
is that xargs could compliantly signal its children to exit but that
it could not compliantly wait indefinitely for them to actually
terminate, since they may not (and if they don't, then xargs is not
behaving as expected, since it should itself terminate).   Signalling
the children is either redundant (since they're part of the same
process group) or potentially unexpected.   I'm not determined that
xargs should _not_ be changed in the way you're suggesting, but an
argument in favour of change would need to be compelling enough to
overcome the various factors that somewhat weigh against making this


reply via email to

[Prev in Thread] Current Thread [Next in Thread]