[bug #64451] Unexpected behaviour of xargs when multiple children exit with 255 in parallel

anonymous <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
Follow-up Comment #2, bug #64451 (project findutils):

    Because checks for WSTOPSIG and WTERMSIG are done in the same place,
sending SIGTERM or SIGSTOP to the children should also cause the same
behaviour. In reality though trying to _kill_ chuldren with this tester

seq 3 | xargs -n1 -P0 sh -c 'for i do echo start $i; sleep 20; echo stop $i;
done' _; echo xargs exited here with $?

I discovered that _kill pid_ causes this behaviour.

start 1
start 2
start 3
xargs: sh: terminated by signal 15 # I run "kill pid" on another terminal
xargs exited here with 125
stop 1
stop 3

But _kill -STOP pid_ causes this:

start 1
start 2
start 3
# I run "kill -STOP pid" on another terminal
stop 1
stop 3
# xargs now just waits. I run "kill -CONT pid" on another terminal.
stop 2
xargs exited here with 0




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64451>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.