From mboxrd@z Thu Jan 1 00:00:00 1970 From: Enrico Scholz Date: Sat, 29 Apr 2006 14:11:34 +0000 Subject: Re: [PATCH] Give a hint when 'udevd' is ready to operate Message-Id: <87psj05v55.fsf@kosh.bigo.ensc.de> MIME-Version: 1 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: References: <877j587nq1.fsf@kosh.bigo.ensc.de> In-Reply-To: <877j587nq1.fsf@kosh.bigo.ensc.de> To: linux-hotplug@vger.kernel.org --=-=-= Kay Sievers writes: >> udevd --daemon >> udevtrigger > > Yeah, that is the usual way and udevd makes sure not to return before > it's fully initialized. Waiting for a file from a daemon, just because > the minit-like stuff tries to be smart (daemons don't detach) sounds > weird. Anyway, the current udevd exports the seqnum of the kernel, so > one can wait for that, Does not work; the first call to export_initial_seqnum() (before fork()) is a noop because | strlcpy(filename, udev_root, sizeof(filename)); | strlcat(filename, "/" EVENT_SEQNUM, sizeof(filename)); | fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); fails due to the non-existing '/dev/.udev' path. So, my patch should be applied earlier | udev_rules_init(&rules, 1); | | + create_path(udev_root); | export_initial_seqnum(); | | if (daemonize) { Enrico --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iQEVAwUARFN0HTyfXseeoEz2AQrF5ggAhiM3O6dXU20eYrI0Kq7DzbFvn6kHiZta swMcUqIzNp6SQsz+XTLnVCZ7qNDTpaZ64CQb5UaTu9LXX5cIZio4k3niUZqZ7VLo sPQitkQc0Zl2rjjotWfFSxDlrSz0EeFb46LIrNnoG/idYulgGdYOj9BZi0+Spuq+ kaI1YLmD7vEGZ++0bZ8JwvR8myfugVtRpIAb28iotcN796NPjS4JfrX1Wntx1pLt MfvATeEaRTZ2yO6sHzrTK++/o+W04XMBrAdPoLUFIieGogPjtufiX5MS2/G/23VX EVtxV9jwdGl+lWWGPAYs9a/K+NDt0C/ZwJGN1wc2uKlNnv0RcOq+ew== =z7B2 -----END PGP SIGNATURE----- --=-=-=-- ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ 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