Calling RegisterServiceProcess from setsid ?

Pierre A. Humblet Pierre.Humblet@ieee.org
Wed Jun 4 13:04:00 GMT 2003


Corinna Vinschen wrote:
> 
> On Tue, Jun 03, 2003 at 10:17:27PM -0400, Pierre A. Humblet wrote:
> > I have tried that but it seems to have no effect.
> > That's easy to test: launch inetd from a shell on 9X (it calls
> > RegisterServiceProcess) and then log off. In my experience it will
> > launch one of these irritating termination pop-ups. Someone should
> > double check though.
> 
> Am I missing something?
> 
> Currently, RegisterServiceProcess() is called from the daemonize code
> in sshd (in the child, right before the call to setsid()).  I don't
> see that RegisterServiceProcess() is called from inetd though.

Oops, I got confused. I shouldn't work late. I'll experiment again
tonight. But you raise another issue that has been in the back of my 
mind: why does inetd behave as a service (survives logouts, except when 
launched under rxvt) even though it doesn't call RegisterServiceProcess() ?

> However, adding a RegisterServiceProcess() call to setsid() would be
> the right thing to do, I guess.  That would probably automagically
> solve the hanging console problem with cron described by Ronald
> Landheer-Cieslak as well, wouldn't it?

Yes. It's that message that triggered my suggestion. Coincidentally
a few days earlier I had added a call to RegisterServiceProcess() 
(from setsid) in exim.

Pierre



More information about the Cygwin-developers mailing list