[comp.unix.questions] Catching signal and sending output to appropriate tty

ramon@skye.mit.edu (Ramon F Herrera) (07/27/90)

I have a very-long-running program which I would like to keep in touch
and tell me how it is doing, on request.  I added a function that catches
the SIGINT signal and prints some partial results.  The problem is that
this works as long as I run the program interactively (I generate the
interrupt by pressing ^C) or in the background (kill -INT 1234).  When I
log out, I seem to loose contact, even if I use the same tty that lauched
the program.  Where does that output go?  Is there any way to access it?
How can my program find out from where (from what tty) did the SIGINT
come?

Please reply directly.

--
Ramon F. Herrera
Research Laboratory of Electronics
Massachusetts Institute of Technology
ramon@iona.mit.edu