Bootscript Updates

Bryan Kadzban bryan at kadzban.is-a-geek.net
Thu Sep 16 16:11:28 PDT 2004


Nathan Coulson wrote:
> I need a simple C program to fake a daemon.
> 
> It should write it's PID# to /var/run/test.pid, then go into the 
> background doing while(1) {sleep();}  Would be neat if it can print 
> out what signals it receives as well (;  [and option to ignore the 
> stop signal]

I'm bored.  :-P

No option to ignore the stop signal (SIGSTOP can't be ignored; maybe you
meant SIGTERM?), but whatever.  It prints the signal number, not the
name, but oh well.

Modeled on ESR's daemon code (from his Unix cookbook).

Compile with a "make test".
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.c
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20040916/8782f7e2/attachment.c>


More information about the lfs-dev mailing list