* Patrick Caulfield

 > multipathd is started very early on in the boot process. often before /var
 > is mounted. PID files go in /var/run and if that dir doesn't exist the PID
 > file handling is even more (and dangerously so) broken.

  Good point, I must admit I didn't consider this (even though I was just
 finished writing a bug report about the libsysfs-in-/usr dependency,
 which never was sent as I discovered #293149..sheesh).

  I don't have any good solution to this problem, I'm afraid..

 > Granted, the current situation isn't great but at least it allows
 > multipathd to actually start on systems where /var is on a seperate
 > partition to root - which was not the case previously.

  I still think just uncommenting the pidfile() call is bad, though.  I
 see the setsid() call is in that function, too..  I would think it would
 be better to make that function a tad more robust, so that it can work
 correctly when /var is available, and if not, just warn and continue.
 For instance:

--- main.c      2005-02-07 21:39:06.000000000 +0100
+++ main.c.tore 2005-02-07 21:46:52.000000000 +0100
@@ -744,9 +744,12 @@
                exit(1);
        }
 
-       file = fopen(DEFAULT_PIDFILE, "w");
-       fprintf(file, "%d\n", pid);
-       fclose(file);
+       if((file = fopen(DEFAULT_PIDFILE, "w"))) {
+               fprintf(file, "%d\n", pid);
+               fclose(file);
+       } else
+               syslog(LOG_ERR, "can't create pid file");
+
        FREE(buf);
 }

Kind regards,
-- 
Tore Anderson


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to