[BusyBox] init restarting RESPAWN progs with controlling tty

Brian T. btuch at usa.net
Tue Jun 24 18:23:12 UTC 2003


This fixed the problem I was having =)

[root at Smog busybox-0.60.5]# diff init.c.orig init.c
846,847c846,857
<       if (*cons == '\0')
<               cons = console;
---
>       if ( action & RESPAWN )
>       {
>               if (*cons == '\0')
>               {
>                       strcpy(cons, "/dev/null");
>               }
>       }
>       else
>       {
>               if (*cons == '\0')
>                       cons = console;
>       }

-Brian


> Got another question about init in Busybox 0.60.5 running on an Embedded
box
> ( but is actually real linux, and not uClinux).
>
> Whenever I kill an entry from inittab which has the "respawn" flag, init
> restarts it, but the new spawned program has the console /dev/ttyS0
> controlling tty.  This causes a problem when traing to debug something
else
> and I hit ctrl-c, which then logs me out.  When logging back in, the
> respawned program now has no controlling tty and everything is as it
should
> be.






More information about the busybox mailing list