monit-dev
[Top][All Lists]
Advanced

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

Re: solaris and kill(pid, 0)


From: Christian Hopp
Subject: Re: solaris and kill(pid, 0)
Date: Wed, 23 Oct 2002 11:29:36 +0200 (CEST)

On 23 Oct 2002, Jan-Henrik Haukeland wrote:

> Christian Hopp <address@hidden> writes:
>
> > kill(pid, 0) does not work on Solaris if you do not own the process!
> > )-: There must be a different possibility to find out if a process
> > is running or not.
>
> What's the problem?  We use following code to check if a process is
> running in util.c:is_process_running
>
>     if(kill(pid, 0) == 0 || errno == EPERM)
>
> Now, if you own the process the first part is TRUE, if you do not own
> the process *but* the process is running, the second part is true.
> Doesn't this litle hack work anymore on your system?

It sometimes does... sometimes not. )-:

During "validate" it works... in the httpd server code it doesn't.  In
the httpd server (not status) errno is set to zero and kill is
returning -1.

I don't know what's wrong there???

C.Hopp



-- 
Christian Hopp                                email: address@hidden
Institut für Elektrische Informationstechnik             fon: +49-5323-72-2113
Technische Universität Clausthal                         fax: +49-5323-72-3197
  pgpkey: https://www.iei.tu-clausthal.de/pgp-keys/chopp.key.asc  (2001-11-22)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]