You are correct in that the use of signals is pretty limited and there isn't a 
convenient way to pass data to the target application.
As long as the daemon and the "caller" are running under the same instance, 
then shared memory, message queues, etc. are all available to you.
(Solaris has a really awesome IPC called "doors",  reminiscent of cross memory 
services, where the server code actually executes under the context of the 
caller, but the port to Linux appears to have died of neglect).

If you want to access the service from external sources, you are pretty much 
left with the TCP/IP port, unless you want to do something fancy and 
non-portable. :O

On Jan 28, 2013, at 7:02 AM, John McKown wrote:

> One way to "talk" to a daemon is to use signals. Such as doing
> something like "kill -HUP $(cat pid-of-syslogd) to tell syslogd to
> restart an reread its configuration file. I've seen other daemons
> which use SIGUSR1 or SIGUSR2. But that's like the old style beepers.
> It could only say "call this number", but didn't tell you anything
> else. Unlike today's SMS text messages which send a sound, the
> originating number, and a short message. Is there anything
> conceptually like this for telling a daemon to "do something" where
> the "something" could be 1 of 100s of different actions (such as
> restart, stop, dump status variables to syslogd, verify if a specific
> user is using the daemon (logged on in some sense) )?
> 
> Or should I look at this more like, say PostgreSQL does, and listen on
> a TCPIP port and/or maybe a UNIX socket?
> 
> As an aside, does anybody use UNIX message queues any more? I can find
> some information on them via Google, but I'm not aware of any actual
> application on my Linux system which uses them. Assume for the nonce
> that I am only speaking of IPC within a given system.
> 
> --
> Maranatha! <><
> John McKown
> 
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
> 

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to