3 ms·
Actually, sending the zero signal to a pid as in `kill -0 <pid>` checks whether that pid exists and whether the calling process has permissions to send signals
by bluetomcat 10y ago
Actually, sending the zero signal to a pid as in `kill -0 <pid>` checks whether that pid exists and whether the calling process has permissions to send signals to it.
- JdeBP 10y ago... at the point that the system call completed. There are no guarantees from that point onwards. Interestingly, it would only take the addition of a pdopen() to something like FreeBSD's pdkill() to get enough for a tool that opened a process descriptor, sent a signal to the process, and determined (with poll() and pdwait4()) whether the process then exited; with the open-descriptor-style interface guaranteeing that it was always referencing the same process.