On Wed, Jun 11, 2014 at 07:04:28AM -0400, Paul Alfille wrote: > Ok, I started a branch called systemd with the two files sd-daemon.c and > sd-daemon.h included. > > A few things look a little strange -- systemd listen sockets are > automatically assigned as file descriptors number 3, 4, 5. I guess we'll > have to test systemd very early to make sure no other file descriptors have > been allocated.
Yes, SD_LISTEN_FDS_START constant is defined as 3. So fds passed from systemd will start at fd number 3. > Also, in the documentation about systemd, there was a long passage about > how the daemonizing should be done external to the program -- is that still > the recommended policy? I guess the early testing could help there. Recommended, but no way mandatory. You can read more about that in "man 7 daemon", section New-Style Daemons. BTW, when doing more complete systemd-support, it would be good to utilize sd_notify("READY=1") to signal systemd that owserver has finished initializing. > Finally, as I understand it, systemd will present the listen socket to > owserver -- so we have to think about how command line parameters are > handled. (Or configuration files) > > A typical owserver invocation: > > # owserver usb bus master, Farenheit temperatures, connect to a remote > owserver as well > owserver -p 4304 -u -F -s otherhost:4304 > > We would ignore the "-p 4304" (actually all the "-p" parameters) but use > the other options? Ignoring command line "-p" seem like the best course. Of course with explanatory line in the logs, like "systemd socket-activation detected, ignoring command line -p parameters". > The examples have only 1 LISTEN_FDS allocated, but hint that multiple could > be passed. That would be not problem for us. Yes, there could be multiple Listen*= directives in owserver.socket unit definition. Passed FDs will correspond to very such directive, in the order they are placed in the unit file. -- Tomasz Torcz RIP is irrevelant. Spoofing is futile. xmpp: zdzich...@chrome.pl Your routes will be aggreggated. -- Alex Yuriev ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers