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: Jan-Henrik Haukeland
Subject: Re: solaris and kill(pid, 0)
Date: 23 Oct 2002 10:40:56 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

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?

-- 
Jan-Henrik Haukeland




reply via email to

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