Heads Up: FESCo is considering to block packages providing sysvinit services without systemd unit

Lennart Poettering mzerqung at 0pointer.de
Fri Nov 11 13:05:30 UTC 2011


On Thu, 10.11.11 11:07, Ian Kent (raven at themaw.net) wrote:

> On Wed, 2011-11-09 at 11:01 +0000, "Jóhann B. Guðmundsson" wrote:
> > On 11/09/2011 05:49 AM, Ian Kent wrote:
> > >>    What other form of encouragement can you suggest?
> > > This email thread for a start.
> > 
> > We have had email threads like this for two release cycles now and yet 
> > the main problem still remains the same packagers/maintainers not either 
> > migrating themselves or they not packaging submitted unit files...
> 
> Thanks for the information on unit files and your efforts to help out,
> it is much appreciated.
> 
> Maybe I'm reading too much into the documentation I read. For example,
> in automount, I don't do a double fork to disassociate from the tty and
> haven't used that technique for many years. 

You aren't? What are you using instead? Note that only double-forking
will properly detach a process from the parent it is started from on
Unix, and hence is not an option but mandatory to do -- unless of course
you are in a systemd environment (or equivalent) which makes the
detaching redundant since it gives you guarantees about the execution
context of your service plain SysV does not give you. Please have a look
at daemon(7) which explains with a check list what daemons need to do on
SysV to daemonize properly.

I mean, don't get me wrong, I am happy if people write daemons in the
new style dropping SysV compatibility cruft. But as I understand you
that's not actually what you are intending here, right? If you care for
SysV compat you must double fork.

> But I also don't have problems with that working properly. Also, I
> don't believe in the idiocy of attempting to close a thousand or more
> file descriptors at daemon startup. There's more I got from the link
> in a previous post to this thread (logging to standard out for
> example) but this is enough to start with.

Well, on SysV it's highly recommended to close all open file
descriptors. On Linux you can do this efficiently by iterating through
/proc/self/fd. Again, if you don't care for SysV comptat you can skip
this step, since systemd guarantees you that the only open fds will be
0,1,2 and (if configured) any fds passed due to socket activation.

> Anyway, I think you may not have quite understood what I was tying to
> say in my last post. My point was I've been frustrated and annoyed in
> the past by init system changes (not necessarily systemd either) so I'm
> a hard case to win over.

Hmm, since it's inception Fedora has been supporting only SysV scripts
for its services and systemd is the first time we have changed that.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list