[Glade-users] getpid
James Cameron
james.cameron@compaq.com
Wed, 01 Nov 2000 11:03:38 +1100
Fethiye Akbulut wrote:
> Does glade/gtk somehow provide an easier way to kill child processes --
> which are spawned by the main program-- or to know their pid's without
> going through pipes?
I don't think so. When you create the process, record the pid. Use
fork() rather than system(). fork() returns the pid. If you have to
use popen(), rewrite it to get you the pid as well.
> If the child processes has a window, would that be possible to lookup
> using the window name to somehow get the pid?
Yes. You could query the X server. Unreliable ... what if there are
more windows with the same name?
--
James Cameron (cameron@stl.dec.com)