As I undertstand it,
kill(pid,0) should return 0 only if process #pid exists ... however, it
seems to be returning 0 no matter what ... so one can't use it to test
the existance of a process. :(
This would be useful when starting a daemon, among other things ... read
the .pid file, and if kill(pid,0) returns an ESRCH, then just delete the
file, since the process is no longer running.
Is my reading wrong?
--- There is a party that | Libertarian Party | A victimless crime is supports the right to | http://www.lp.org | a contradiction in free speach and | The Party of | terms. encryption!! | Principal |
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/