in reply to killing a process

The best i can suggest for writting to a terminal before killing, is to use with the unix write program , or even print directly into the users tty (though that not usually very nice, as if they are typing a command it will interrupt). Once that is done, you could kill the shell as normal. This works diffrent ways on diffrent systems, and on many the echo "foo" > /dev/tty2 trick does not work, so test it on yours.
i had a memory leak once, and it ruined my favorite shirt.

Replies are listed 'Best First'.
Re: Re: killing a process
by hotshot (Prior) on Nov 19, 2001 at 20:37 UTC
    Hotshot
    I tried what you said, but as you mentioned, the solution you suggested works differntly on different systems, and I wasn't lucky here, so I tried sending SIGPIPE to the process and catch it there, in my sigPipe handler I printed a message to the user and comitted suicide with:
    kill('KILL', $$);
    and it worked perfectly
    but thanks anyway