Laurent,
Thanks for the quick turnaround. Let's see if I understand. The key part is
here:
case SIGTERM :
if (flagprotect) break ;
case SIGHUP :
handle_stdin = &last_stdin ;
if (!indata.len) { prepare_to_exit() ; e = 1 ; }
break ;
The risk is that
Laurent,
Thanks for the quick turnaround. Let's see if I understand. The key part
is here:
case SIGTERM :
if (flagprotect) break ;
case SIGHUP :
handle_stdin = &last_stdin ;
if (!indata.len) { prepare_to_exit() ; e = 1 ; }
break ;
The risk is that l
So indeed, when an exit signal was received at the same time stdin was
readable (unless your producer is spamming logs, that's a rare event,
which is why I never saw it), prepare_to_exit() was called but the
xindex0 marker was not updated and the remainder of the iteration still
called *handle_
Laurent,
I don't like opening anything (even /dev/null) on an exit path
Though I was looking to keep the scope of my efforts limited, I think
this would be preferred if you an achieve it.
Earl
On , Laurent Bercot wrote:
IIRC the use case involves signal handling, which causes
prepare_to_
IIRC the use case involves signal handling, which causes prepare_to_exit() to
be called in handle_signals(). Once the signal handler returns, stdin is
closed. The mainline continues to refer to the now closed file descriptor, and
emits errors as consequence. The process terminates, but the path