in reply to How do I get status from daemon
All the ways you mention are possible. The choice depends on how much other communication you need, and on the operating circumstances.
A daemon usually sets up what its STDERR is to be (no controlling terminal), often a log file opened to append. You could write to STDERR on that assumption.
Daemons often create a file named for their pid to aid in signaling. You could system {"/bin/touch /tmp/mydaemon/$$"}; whenever the config is read, then the curious can stat that for reassurance.
A socket or pipe is fine if you have other uses for it, but is overkill for the message you want.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
touch? Blech!
by Fletch (Bishop) on Nov 06, 2001 at 20:11 UTC |