[Setup-tool-hackers] Fwd: Re: Standard way to find a runningexecutable?



Is this something to be provided by the xst?  The backend should be getting a 
name daemon/server and answer (in xml) whether it is running or not.
The underneath example discusses cupsd, however the question was how to 
discover that a process is running?

----------  Forwarded Message  ----------

Subject: Re: Standard way to find a running executable?
Date: Wed, 20 Jun 2001 16:03:09 +0200
From: Michael Goffioul <goffioul@imec.be>
To: kde-devel@kde.org

Adriaan de Groot wrote:
> On Wed, 20 Jun 2001, Michael Goffioul wrote:
> > Is there a (UNIX) standard way to detect if a program is running, given
> > its name. For example, I would like to detect a running cupsd server.
> > Is there an easy way to do that?
>
> Sensible daemons provide /var/run/daemon.pid or somesuch; I believe AleXXX
> was concerned with a similar problem about a month back but there's really
> no general solution, since there is no general portable way of getting at
> the list of running-process-names.

If I check the existence of:
  - /var/lock/subsys/<daemon>
  - /var/run/<daemon>.pid
  - /var/run/<daemon>

Would it be sufficient to work on most of UNIX flavour?


-- 
Richard Bos
For those who have no /home the journey is endless

_______________________________________________
setup-tool-hackers maillist  -  setup-tool-hackers@ximian.com
http://lists.ximian.com/mailman/listinfo/setup-tool-hackers



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