Someone help me understand this...?

Garrett Wollman wollman at khavrinen.lcs.mit.edu
Sat Aug 30 12:05:50 PDT 2003


<<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



More information about the freebsd-current mailing list