Problem with g_spawn_async_with_pipes



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm using GTK/GLIB to spawn an application with
g_spawn_async_with_pipes. The command I am using is this

ok = g_spawn_async_with_pipes(NULL, argv, NULL,
                                  G_SPAWN_SEARCH_PATH,
                                  NULL, NULL, NULL, &std_in, &std_out,
&std_err, NULL);


The only problem I am appearing to have is that the new process that is
created has a PPID of 1 rather than the PID of the application that
spawned it. So if my app receives a SIGKILL (like in the case of someone
killing X), then my app cannot shutdown the spawned app, due to the KILL
and the spawned app also does not get the kill signal since it is not in
the signal tree of the application.

Is there a setting I can use to correct this? I have tried using
sigaction to hook kill, but that fails for SIGKILL.

Thanks,

Kevin
- --
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkk0RKYACgkQ6w2kMH0L1dGEHwCdE6brlXkZgJzyIaU1qGEnFYpU
+GoAn3Agnh7QtPK+f6avHbsVPXMt+Uzb
=Qo5D
-----END PGP SIGNATURE-----



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