From: Denis D. <dp...@al...> - 2001-01-14 07:16:50
|
Hi Brian, I put in about 2 days on this and have finally determined what is going on. It seems the 2.4.0 kernel for the SH is starting up the init process with SIG_CHLD set to SIG_IGN and not SIG_DFL. All child processes are getting reaped by the init process rather than waiting around as zombies. This is why pclose fails. The seems to be a 2.4.0 SH kernel problem but I could not find a way to fix this. Instead I set SIG_CHLD to SIG_DFL in the busybox init program I am using and all works correctly. I suspect that this is fixed in the latest BusyBox release and broken in 0.48. Strange though? Regards, Denis. ---------- > From: Bryan Rittmeyer <br...@ix...> > To: Denis Dowling <ddo...@po...> > Cc: lin...@li... > Subject: Re: [linuxsh-dev] waitpid and 2.4.0 kernel > Date: Sunday, 14 January 2001 7:15 > > Denis Dowling wrote: > > > I am trying to chace down a problem with popen() and pclose() using the > > latest 2.4.0 kernel on the SuperH. I seems that waitpid is always > > returning ECHILD even when the child process pid is correct and the > > process has exited correctly. Is anyone else seeing this? > > Yep. Interestingly enough, it shows up with the latest CVS version of > BusyBox, but not with the 0.48 BusyBox release (or maybe vice versa, I > don't remember exactly). I started noticing it after moving from -test10 > to 2.4.0, but I also changed binutils / gcc / glibc at the same time. > Not precisely sure it's a kernel problem... > > Regards, > > Bryan > > -- > Bryan Rittmeyer > mailto:br...@ix... > Ixia Communications > 26601 W. Agoura Rd. > Calabasas, CA 91302 |
From: Bryan R. <br...@ix...> - 2001-01-16 23:38:19
|
Denis Dowling wrote: > The seems to be a 2.4.0 SH kernel problem but I could not find a way to fix > this. Instead I set SIG_CHLD to SIG_DFL in the busybox init program I am > using and all works correctly. Could you please supply me a patch for this? > I suspect that this is fixed in the latest BusyBox release and broken in > 0.48. Strange though? Actually, I am still seeing this problem with 0.49pre BusyBox CVS and 2.4.0-pre2 LinuxSH CVS. For example: [@(none) /]# mount -t ramfs ramfs mnt mount: Mounting ramfs on mnt failed: No such device sh: tcsetpgrp: Operation not permitted sh: waitpid(56): No child processes Process '/bin/busybox sh' (pid 11) exited. Scheduling it for restart. Please press Enter to activate this console. I don't think the "tcsetpgrp" complaint is related, but I did start seeing it after moving up from 2.4.0-test10. Perhaps I need to upgrade to glibc2.2? Bryan -- Bryan Rittmeyer mailto:br...@ix... Ixia Communications 26601 W. Agoura Rd. Calabasas, CA 91302 |
From: Denis D. <ddo...@po...> - 2001-01-17 00:07:43
Attachments:
busybox-sigchld.patch
|
Hi Brian, I have attached the init patch for busybox. I am still using busybox-0.47 but I suspect this patch will work with newer versions of busybox. This patch makes init set the SIGCHLD handling to SIG_DFL. This should not be needed but for some reason the 2.4.0 kernel is starting the init process with SIGCHLD set to SIG_IGN. Regards, Denis. PS: If you have the flash space I would replace busybox sh with a real version of bash. It makes the target environment SO much more user friendly. Bryan Rittmeyer wrote: > > Denis Dowling wrote: > > > The seems to be a 2.4.0 SH kernel problem but I could not find a way to fix > > this. Instead I set SIG_CHLD to SIG_DFL in the busybox init program I am > > using and all works correctly. > > Could you please supply me a patch for this? > > > I suspect that this is fixed in the latest BusyBox release and broken in > > 0.48. Strange though? > > Actually, I am still seeing this problem with 0.49pre BusyBox CVS and > 2.4.0-pre2 LinuxSH CVS. For example: > > [@(none) /]# mount -t ramfs ramfs mnt > mount: Mounting ramfs on mnt failed: No such device > sh: tcsetpgrp: Operation not permitted > sh: waitpid(56): No child processes > Process '/bin/busybox sh' (pid 11) exited. Scheduling it for restart. > > Please press Enter to activate this console. > > I don't think the "tcsetpgrp" complaint is related, but I did start > seeing it after moving up from 2.4.0-test10. Perhaps I need to upgrade > to glibc2.2? |
From: Greg B. <gb...@po...> - 2001-01-17 01:03:14
|
Denis Dowling wrote: > > PS: If you have the flash space I would replace busybox sh with a real > version of bash. It makes the target environment SO much more user > friendly. Also, I found that the /etc/pcmcia scripts don't work at all with busybox sh, they need a proper implementation of /bin/sh. Greg. -- These are my opinions not PPIs. |