Re: oaf patch to keep servers in process group



On 21Jul2001 02:23PM (-0400), Havoc Pennington wrote:
> 
> 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.

Is there any way you can see if it at least compiles on, say, FreeBSD?
I'm always wary of making these kinds of changes and then being flamed
by BSD fans. If there's no convenient way for you to do that, just go
ahead with it.
 
> > 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.
> 

OAF lets you register your server as per-display rather than
per-system at registration time. This does not require additional oafd
instances, although the way it works is a bit of a hack. 

There's no way to make servers per-session because I can't think of a
case where it matters. You can't run two different sessions on the
same display at the same time, as far as I know. And even if you
could, it seems to me it would be fine to share out-of-proc servers
between processes in the two sessions.

But I'll be glad to add features given a real user need. 

Regards,

Maciej






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