Re: [chrony-dev] Feedback for libchrony API

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


Hi,

On Thu, 24 Aug 2023 at 10:09, Miroslav Lichvar wrote:

Is there a portable way to detect when a Unix socket is no longer referenced by anything?

how about just trying to connect to the socket when the respective file exists? If the connection succeeds the socket is in use and if it fails with ECONNREFUSED it is unused and can be deleted and reused.

Do I miss anything?

cu
Reinhard

--
SUSE Software Solutions Germany GmbH (HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev, Andrew McDonald, Werner Knoblich

--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/