On Thu, 3 Apr 2014 11:53:40 +0200, Miroslav Lichvar wrote:
> As a future improvement, I think it would be nice if ptp4l sent a
> notification when exiting so phc2sys could stop its synchronization
> and wait until ptp4l is running again.

I was thinking about how to implement this. In particular, I'd like
this to be more robust and detect also ptp4l being killed.

The most obvious option, detecting whether other side closed its part
of the unix socket, would require changing it from SOCK_DGRAM to
SOCK_SEQPACKET. Which means ptp4l would have to keep track of all
uds clients, deal with accept calls, etc., and most importantly, poll
these additional file descriptors. That would require quite substantial
changes throughout the whole code. But then, uds is treated specially
in most places, perhaps stopping pretending it's another transport
wouldn't be bad.

Other option is polling from phc2sys every phc_interval. That's ugly,
consuming unnecessary resources and unreliable anyway.

Better option would be asking ptp4l about its PID and monitoring it.
That would be reliable enough but still polling, although rather cheap
polling.

Thoughts? Different ideas?

Thanks,

 Jiri

-- 
Jiri Benc

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to