commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Heumüller <>
Subject [Exec/Daemon/?] Discover if daemon is active
Date Sat, 28 Apr 2012 08:52:31 GMT
Hi there,

I'm sorry about the imprecise category tag. In my current project I use
commons.exec in order to launch instances of avahi-publish and
avahi-browse. Thanks to the help I received here so far everything
seems to be working nicely :)

Obviously the avahi-* binaries depend on the avahi-daemon to be active.
How do I determine if a daemon is active? I have several ideas, but I'm
not sure whether they will work on any UNIX/Linux distribution.

1) Search /var/run for avahi or avahi-daemon 
	(on archlinux it would be in /var/run/daemons)
2) Exec ps -ef | grep avahi and parse output
	(should work on any posix compatible system?)

The second alternative seems rather failsafe to me, but maybe you can
surprise me with a more elegant solution with less overhead?

Thank you for your time and effort

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message