pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
if (pid>0)
while (pid != wait(&i));
this could be changed to something like (*) :
pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
if (pid>0)
while (waitpid(-1, &i, WNOHANG) != pid) {
if (current->signal & (1 << SIGINT)) {
kill(pid, SIGINT);
current->signal &= ~(1 << SIGINT);
}
sleep(2);
}
obviously the above will keep waking up and polling again, and could
take a while to notice a signal (or the exit of linuxrc), however as this
will only run for a while at system start up it shouldn't be too bad.
(*) The code will almost certainly have to be changed to run correctly
in kernel mode, but it gives you the gist of the idea.
DF
-- Derek Fawcus df@eyrie.demon.co.uk