[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there a way to make sure 141 exit status is resulted when pipelin
From: |
Peng Yu |
Subject: |
Re: Is there a way to make sure 141 exit status is resulted when pipeline is terminated prematurelly? |
Date: |
Wed, 7 Oct 2020 09:15:06 -0500 |
> To expand on this, in the first command, the total output of the seq
> command is only 21 bytes, which is smaller than the size of the pipe
> buffer on every operating system. So, the buffered output (since stdout
> is not a terminal) is written all at once when the seq command exits.
> At that point, the pipe is still up and "running", the reader is still
> blocked, and there is no reason to expect a SIGPIPE for the writer.
So, in the above case, there are no other ways for the caller of the
pipeline to know whether it is a partial result being printed or alll
the result being printed? Thanks.
--
Regards,
Peng