From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Fri, 06 Feb 2004 00:47:02 +0000 Subject: Re: udev 16, two copies of udevd Message-Id: <20040206004702.GA3897@vrfy.org> MIME-Version: 1 Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT" List-Id: References: <20040204011117.26382.qmail@web14912.mail.yahoo.com> In-Reply-To: <20040204011117.26382.qmail@web14912.mail.yahoo.com> To: linux-hotplug@vger.kernel.org --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 05, 2004 at 04:32:16PM -0800, Greg KH wrote: > On Fri, Feb 06, 2004 at 12:49:46AM +0100, Kay Sievers wrote: > > > > Jon, please try the current bk tree. We switched away from the socket file, > > that gets missing with the tmpfs mount. > > It should work now, cause we can't listen twice on the same socket in > > abstract namespace. > > > > Greg, it seems we can remove the lock file code completely. > > I agree, it should be safe to remove that now, which is a very good > thing. > > Care to send a patch? Or I can do it. Here we go... --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="01-kill-lockfile.patch" ===== Makefile 1.103 vs edited ===== --- 1.103/Makefile Thu Feb 5 02:41:19 2004 +++ edited/Makefile Fri Feb 6 01:39:07 2004 @@ -241,7 +241,6 @@ @echo \#define UDEV_PERMISSION_FILE \"$(configdir)\udev.permissions\" >> $@ @echo \#define UDEV_BIN \"$(DESTDIR)$(sbindir)/udev\" >> $@ @echo \#define UDEVD_BIN \"$(DESTDIR)$(sbindir)/udevd\" >> $@ - @echo \#define UDEVD_LOCK \"$(udevdir)/\.udevd.lock\" >> $@ # config files automatically generated GEN_CONFIGS = $(LOCAL_CFG_DIR)/udev.conf ===== udev-remove.c 1.17 vs edited ===== --- 1.17/udev-remove.c Thu Jan 15 16:22:25 2004 +++ edited/udev-remove.c Fri Feb 6 01:24:11 2004 @@ -34,7 +34,6 @@ #include "logging.h" #include "namedev.h" #include "udevdb.h" -#include "libsysfs/libsysfs.h" static int delete_path(char *path) { ===== udevd.c 1.13 vs edited ===== --- 1.13/udevd.c Thu Feb 5 10:32:51 2004 +++ edited/udevd.c Fri Feb 6 01:37:52 2004 @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -324,7 +322,6 @@ switch (signum) { case SIGINT: case SIGTERM: - unlink(UDEVD_LOCK); exit(20 + signum); break; default: @@ -332,28 +329,6 @@ } } -static int one_and_only(void) -{ - char string[50]; - int lock_file; - - lock_file = open(UDEVD_LOCK, O_RDWR | O_CREAT, 0x640); - if (lock_file < 0) - return -1; - - /* see if we can lock */ - if (lockf(lock_file, F_TLOCK, 0) < 0) { - dbg("file is already locked, exit"); - close(lock_file); - return -1; - } - - snprintf(string, sizeof(string), "%d\n", getpid()); - write(lock_file, string, strlen(string)); - - return 0; -} - int main(int argc, char *argv[]) { int ssock; @@ -368,10 +343,6 @@ int retval; init_logging("udevd"); - - /* only let one version of the daemon run at any one time */ - if (one_and_only() != 0) - exit(0); signal(SIGINT, sig_handler); signal(SIGTERM, sig_handler); --tKW2IUtsqtDRztdT-- ------------------------------------------------------- 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