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

Always re-read your code [Was: Finding if a process is runing.]



Extremly sorry - it _was_ an invalid argument :-)

the man page clearly state :
int kill(pid_t pid, int sig);

while my code reads :
if (kill(0,_pidChild)) {

again, sorry...

Oded

--
X windows:
        Do your time.


----- Original Message -----
From: "Nadav Har'El" <nyh@math.technion.ac.il>
To: "Oded Arbel" <odeda-linux-il@betalfa.org.il>
Cc: "Linux-IL Mailing list" <linux-il@cs.huji.ac.il>
Sent: Thursday, February 08, 2001 10:37
Subject: Re: Finding if a process is runing.


> check the kill(2) manual for the error codes returned by the kill() system
> call. "Invalid argument" (EINVAL) means that you specified an invalid
signal.
> 0 is _not_ an invalid signal, so maybe you got the code wrong - can you
> post a short code section?
> The diagnostics you should expect from kill() is either success, or
failure
> with errno being ESRCH (the process does not exist), or EPERM (the process
> does in fact exist, but it is not yours).



=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il