The title basically says it all. tee has an option --ignore-interrupts:
-i, --ignore-interrupts ignore interrupt signals
Can anyone explain/give an example in which situation this is important? Thanks!
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityWhen called with -i
, tee
ignores the interrupt signal (SIGINT
), which is normally issued by your terminal when hitting Ctrl+C.
tee
in a command line pipe like some long running command | tee output
, this might be helpful if you want to kill the input provider with Ctrl+C
, but want tee
to exit gracefully (by reading EOF
from the pipe).
Jul 4, 2014 at 13:46
-i
option and did a Ctrl+C both times. The output file was identical. What's the point of this.
Oct 28 at 11:38
If tee
is used with -i, --ignore-interrupts
options, It wont accept any interrupt signals like CNTRL+C ^C or Kill signals Except signal KILL or Signal Terminate.
tee
does exactly what the option states and only ignores SIGINT
. All other signals are delivered as without -i
.
Apr 4, 2014 at 16:17