All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darryl L. Miles" <darryl@netbauds.net>
To: linux-kernel@vger.kernel.org
Subject: Re: 2.6.12 initrd module loading seems parallel on bootup
Date: Mon, 27 Jun 2005 06:47:00 +0100	[thread overview]
Message-ID: <42BF92D4.3040609@netbauds.net> (raw)
In-Reply-To: <20050626141106.GA12223@shuttle.vanvergehaald.nl>


Are we sure we are not talking about two different problems here.

I'm using RedHat and mkinitrd, in the initrd image there is already a 
skeleton /dev tree that contains my real-root device.  udev also exists 
in the initrd image.  I don't think any /dev device magic was necessary 
for me too mount root.

It is not clear Chris which tools you are using on initrd, standard 
Gentoo methods or a home brew setup ?  What shell is calling modprobe ?  
Can you confirm at what point you are seeing modprobe exit ?

* Immediatly (before device driver has detected hardware and reported / 
registered its findings).  This is the symptom I was seeing, but the 
cause was incorrect shell handling. 
* After detection but before device node creation.
* After device node creation.


FYI - This looks like the snippet from nash.c

@@ -403,7 +450,7 @@
 int otherCommand(char * bin, char * cmd, char * end, int doFork) {
     char ** args;
     char ** nextArg;
-    int pid;
+    int pid, wpid;
     int status;
     char fullPath[255];
     static const char * sysPath = PATH;
@@ -479,10 +526,20 @@

        close(stdoutFd);

-       wait4(-1, &status, 0, NULL);
-       if (!WIFEXITED(status) || WEXITSTATUS(status)) {
-           printf("ERROR: %s exited abnormally!\n", args[0]);
-           return 1;
+       for (;;) {
+            wpid = wait4(-1, &status, 0, NULL);
+            if (wpid == -1) {
+                 printf("ERROR: Failed to wait for process %d\n", wpid);
+            }
+
+            if (wpid != pid)
+                 continue;
+
+            if (!WIFEXITED(status) || WEXITSTATUS(status)) {
+                 printf("ERROR: %s exited abnormally with value %d ! (pid %d)\n", args[0], WEXITSTATUS(status), pid);
+                 return 1;
+            }
+            break;
        }
     }


-- 
Darryl L. Miles



  reply	other threads:[~2005-06-27  5:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-26  1:02 2.6.12 initrd module loading seems parallel on bootup Darryl L. Miles
2005-06-26  3:53 ` Christian Trefzer
2005-06-26  6:46 ` Andrew Morton
2005-06-26  9:26   ` Pozsár Balázs
2005-06-26 11:53     ` Christian Trefzer
2005-06-26 10:06   ` Darryl L. Miles
2005-06-26 12:00     ` Christian Trefzer
2005-06-26 14:11       ` Toon van der Pas
2005-06-27  5:47         ` Darryl L. Miles [this message]
2005-06-29 23:39           ` Christian Trefzer
2005-06-30  8:45             ` Darryl L. Miles
2005-06-30 14:12               ` Christian Trefzer
2005-06-26 13:19   ` Parag Warudkar
     [not found] <4jtOU-508-21@gated-at.bofh.it>
     [not found] ` <4jz7U-9S-7@gated-at.bofh.it>
     [not found]   ` <4jBCN-20Q-9@gated-at.bofh.it>
2005-06-27  6:24     ` Martin Wilck
  -- strict thread matches above, loose matches on Subject: below --
2005-06-25 22:09 Darryl L. Miles

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42BF92D4.3040609@netbauds.net \
    --to=darryl@netbauds.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.