Sample Header Ad - 728x90

Why is tee stopping in the middle when piped with nohup?

0 votes
1 answer
143 views
I'm running a script (in a Laravel project) that takes a few hours to complete. nohup to prevent it from exiting if my ssh session is disconnected.
-shell
nohup php artisan do:thing 2>&1 | tee ~/tmp
It starts off nicely, but after some time, I get a broken pipe error and it stops outputing things, and tee stops as well - the doc stops at that point. I guess it's because the tee process got killed by the ssh session drop? Can I prevent it? Could I maybe disown the tee process and prevent ssh from terminating it?
Asked by Jeremy Belolo (103 rep)
Jan 11, 2024, 07:16 AM
Last activity: Jan 11, 2024, 08:38 AM