Path: utzoo!attcan!uunet!mcsun!unido!marco!leo From: leo@marco.UUCP (Matthias Pfaller) Newsgroups: comp.os.minix Subject: bug in init.c Keywords: wait for rc to terminate Message-ID: <433@alice.marco.UUCP> Date: 2 Jul 90 07:54:12 GMT Organization: marco GmbH, 8047 Karlsfeld, West-Germany Lines: 30 There is (I think) a bug in init.c. If you use pipes in /etc/rc not all processes are children of the shell executing /etc/rc. So init adopts them and continues after their termination instead of after the termination of /etc/rc. Matthias Pfaller (leo@verw.marco.de) *** init.c Fri Jun 1 11:15:23 1990 --- init.c.new Mon Jul 2 08:48:13 1990 *************** *** 122,130 **** sync(); /* force buffers out onto disk */ /* Execute the /etc/rc file. */ ! if(fork()) { /* Parent just waits. */ ! wait(&status); } else { /* Child exec's the shell to do the work. */ if(open("/etc/rc", 0) < 0) exit(EXIT_OPENFAIL); --- 122,131 ---- sync(); /* force buffers out onto disk */ /* Execute the /etc/rc file. */ ! if(pid = fork()) { /* Parent just waits. */ ! while (wait(&status) != pid) ! ; } else { /* Child exec's the shell to do the work. */ if(open("/etc/rc", 0) < 0) exit(EXIT_OPENFAIL);