Calling RegisterServiceProcess from setsid ?

Christopher Faylor cgf@redhat.com
Wed Jun 4 04:15:00 GMT 2003


On Tue, Jun 03, 2003 at 11:43:25PM -0400, Pierre A. Humblet wrote:
>I thought that RegisterServiceProcess was not changing a program 
>launched from the shell into a service, but only had effects on 
>programs descending from those listed in the registry, under 
>/HKLM/.../RunServices
>I now see that's incorrect, although, when launched from rxvt,
>a program calling setsid and RegisterServiceProcess is not turned
>into a service.

Wow, that's strange.

>>I don't know what is specific to rxvt.  Maybe it's the @#(&!
>>pty/FreeConsole stuff.
>
>How do you debug that stuff?  Running under gdb or strace seems to
>change many things.

Yes, especially on Windows 9x.  I really don't know.  Can you add a
try_to_debug () at an appropriate point and have it pop up a gdb only
when necessary?

Also, does turning on the wincap "pty_needs_alloc_console" cause
anything to work better with rxvt.  I assume that it probably won't
but...

>Overall I agree with you that setsid does not imply service (although
>I can't name any case) but that it would still be beneficial to call 
>RegisterServiceProcess from setsid.

Right.  We're in violent agreement.  I was just being pedantic.

cgf



More information about the Cygwin-developers mailing list