This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: Calling RegisterServiceProcess from setsid ?
On Wed, Jun 04, 2003 at 09:21:38PM -0400, Pierre A. Humblet wrote:
>At 12:16 AM 6/4/2003 -0400, Christopher Faylor wrote:
>>>>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?
>
>I have just run fairly extensive tests on WinME with 4 programs
>and a cygwin from yesterday's cvs.
>- inetd (standard), calls setsid but not RegisterServiceProcess
>- cron (standard), ditto
>- sshd (standard), calls setsid and RegisterServiceProcess
>- exim (special), ditto
>
>I am getting results all over the place.
>Perhaps they make sense to others.
>
>Test 1: run under strace in rxvt windows
>****************************************
>- inetd: OK, fhandler_console::open_fhs is 0 when calling setsid
>- cron: same
>- exim: same
>- sshd:
>/c: strace -o sshd.txt ./sshd
> 517345 [main] sshd 938013 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
> 529292 [main] sshd 938013 open_stackdumpfile: Dumping stack trace to SSHD.EXE.stackdump
> no useful info in dump.
That's usually a sign of a bad pointer reference in a call to
strace_printf. I usually debug these by starting the program in the
debugger and setting strace.active = 1. Sometimes I set a breakpoint in
strace::hello first.
>P.S.: unrelated. Sometimes when I start bash for the first time after login
>2021798 [main] bash 90753 cygthread::terminate_thread: VirtualFree of allocation base 0x2154FFA0<0x21340000> failed, Win32 error 0
Since I don't have a Windows ME available to me easily, I guess that
problem will have to languish.
cgf