rc script running twice ???

Kyle Smith askreet at gmail.com
Thu Jan 27 14:38:06 EST 2011


On Thu, Jan 27, 2011 at 2:26 PM, Drew Van Zandt <drew.vanzandt at gmail.com>wrote:

> Debian Linux (embedded), I'm in runlevel 2, and I'm seeing this when I run
> ps aux:
>
> root       496  0.0  1.9   2808  1232 ttyS0    S+   00:00   0:00 /bin/sh
> /etc/rc2.d/S40init_xuarts start
> root       498  0.0  0.8   2808   504 ttyS0    S+   00:00   0:00 /bin/sh
> /etc/rc2.d/S40init_xuarts start
>
> S40init_xuarts is a script of mine that I just put in /etc/init.d/ and
> linked from rc2.d.
>
> Why is it running twice?  I've gone through the first page of possibilities
> from a google search, I'm hoping one of you can point out my obvious silly
> mistake,
>
since I'm blanking.
>

Is 496 the parent of 498, or are they two distinct copies?  If so, it's
probably because it starts with #!/bin/sh.

Typically your S* scripts should exec and background whatever service you're
trying to start, not stay running once the system is loaded.  Otherwise ps
aux would be full of S* scripts.  You might want to look at
start-stop-daemon in Debian.

- Kyle


>
> --
> *
> Drew Van Zandt
> Artisan's Asylum Craft Lead, Electronics & Robotics
> *
>
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20110127/99c1f228/attachment.html 


More information about the gnhlug-discuss mailing list