Re: oaf patch to keep servers in process group



Maciej Stachowiak <mjs noisehavoc org> writes: 
> That's fine. Is your code portable to both BSD and System V systems? I
> know from reading Advanced Programming in the Unix Environment that
> they have slightly different semantics about process groups and
> sessions. It would be nice actually if oafd would properly daemonize
> itself in the way recommended by APUE.

I think oafd does end up properly daemonized, but part of the logic is
on oaf_server_by_forking() (setsid() is in there, instead of in oafd
itself).

I was using APUE to write this code, I don't remember him saying it
wasn't portable, except that he said some systems lack job control and
would ENOSYS when you try to set the process group. But the example
system he gave was some ancient digital unix crapola, so I'm not sure
we care.

> Right now, oafd is per-user per-machine. My plan to deal with the
> life cycle problems is to make oafd exit after some period of
> inactivity and transparently restart. I don't know how soon I will
> get to this though.
>  

Right, the logging thing is probably correct.

The other issue that remains even after that though is that some
servers really _should_ be per-display or per-session or what have
you.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]