Re: g_spawn_async_with_pipes() and kill()



On Tuesday 12 September 2006 23:36, Wallace Owen wrote:
On Tue, 2006-09-12 at 23:19 +0100, Rui Tiago Cação Matos wrote:
On Ter, 2006-09-12 at 22:37 +0100, Chris Vine wrote:
Yes, in Linux (and probably most other Unix-like OSs), SIGTERM is
defined as 15.

Maybe I haven't explained myself clearly. I know SIGTERM is defined as
15. Ok, but shouldn't kill(PID, SIGTERM) do the right thing and kill
_only_ the application with pid PID? Because right now it kill my pppd
and also my application (the one which calls kill()).

Perhaps your parent process is being terminated because it isn't
catching sigpipe, and it had a write to a pipe the child reads from.
When the child is killed, sigpipe is raised on the writing process.

You could try putting your child into it's own process group.  See W.
Richard Steven's "Advanced programming in the Unix Environment", chapter
nine.

Ah, but then it wouldn't terminate with signal 15.  (SIGPIPE is usually 13.)

Chris




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]