From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Friesen Date: Sat, 07 Feb 2004 07:06:25 +0000 Subject: Re: [PATCH] convert udevsend/udevd to DGRAM and single-threaded Message-Id: <40248E71.90102@sympatico.ca> List-Id: References: <40232F58.3040404@sympatico.ca> In-Reply-To: <40232F58.3040404@sympatico.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Patrick Mansfield wrote: > I mean, SOCK_DGRAM is an unreliable transport, so what happens if the > transport drops packets? It might be unlikely, especially for the AF_LOCAL, > but it is possible. > > I don't see any ack or retransmit code in udevsend. Unix sockets are basically reliable. Barring something really wierd going on, if the server is present, a blocking sendto() (with valid parameters, of course) will succeed eventually, which guarantees that the message was queued up in the server's receive buffer. If the server is not present, then you get an errno of ECONNREFUSED, and you know to start the server. From the man page: "Unix sockets are always reliable and don't reorder datagrams." It would be easy to make it totally reliable by doing periodic retries in udevsend and have udevd send back an ack when cleaning up the message after udev completes. I could send this in if people are interested. Chris ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel