Re: Someone help me understand this...?

From: Garrett Wollman <wollman_at_khavrinen.lcs.mit.edu>
Date: Sat, 30 Aug 2003 15:05:48 -0400 (EDT)
<<On Sat, 30 Aug 2003 12:23:35 -0400 (EDT), Robert Watson <rwatson_at_freebsd.org> said:

> The only way to close this sort of race is to have a notion of a
> unique process identifier that lasts beyond the lifetime of the
> process itself -- i.e., the ability to return EMYSINCERESTREGRESTS
> if you try to signal a process after it has died, and have a
> guarantee that the handle won't be reused.

This is traditionally done by holding an advisory lock on the pid
file; if the file is no longer locked, then the process holding the
lock must have exited.

You could also do it with UUIDs and a more heavyweight signal API.

-GAWollman
Received on Sat Aug 30 2003 - 10:05:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:20 UTC