K 10
svn:author
V 6
iulius
K 8
svn:date
V 27
2015-10-24T19:32:35.647915Z
K 7
svn:log
V 964
nntpsend:  correctly exit after all of the child processes exit

The documentation for nntpsend claims that it waits until all of the
child innxmit processes exit before it does, but it doesn't.

The reason it does not is because it starts the innxmit processes,
or more accurately the subshells that start the innxmit processes,
in a while loop that is itself in a child process of the main shell,
because of this line:

    cat ${INPUT} | while read SITE HOST SIZE_ARG FLAGS; do

Since the while loop is in a pipe, it's executed in a child process. As
a result, its child processes, i.e., the ones running innxmit, are not
direct children of the nntpsend shell script's process, so it doesn't
wait for them.

Note that this bug causes nntpsend to fail to work properly on systems
that use systemd, because when nntpsend exits prematurely, systemd
kills all of the processes it launched, including the innxmit processes.

Thanks to Jonathan Kamens for the patch.

END
