[Glade-users] getpid



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)





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