Sample Header Ad - 728x90

identify process sending a signal to a shell script

3 votes
1 answer
591 views
I've written a shell script that uses the trap feature to output its progress when it receives a SIGUSR1 signal, but I don't see how to have the script be able to output the progress to the STDOUT of the process which sent the signal. So, if the script is running in terminal emulator /dev/pts/10 and I send the process a signal from a terminal emulator on /dev/pts/11, the output is going to /dev/pts/10, but I want to send to /dev/pts/11. I do NOT want to have to resort sending the progress message via wall or hard-coded shell redirection to a specific STDOUT.
Asked by user1404316 (3138 rep)
Jun 24, 2020, 06:08 PM
Last activity: Jun 24, 2020, 09:00 PM