This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Calling RegisterServiceProcess from setsid ?


At 11:12 AM 6/7/2003 -0400, Christopher Faylor wrote:
>I guess fhandler_tty_slave::close could call FreeConsole too when the
>last tty is closed and setsid has been previously called.
>
>I'll check in a change to do this.

Thanks Chris. That does it.

I met two problems while using try_to_debug in daemons that have 
forked but not yet closed their std handles. 
The most serious was that although gdb was created with a new console, 
it's not always using it for I/O.
In some situations (e.g. try_to_debug is setsid, with sshd) it's 
competing for input with the shell, and losing. 
I don't know how to fix that. 

The other problem is trivial, I had a space in the program path.
Actually it would be better to quote the two %s below.
 
Pierre

Index: exceptions.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/exceptions.cc,v
retrieving revision 1.147
diff -u -p -r1.147 exceptions.cc
--- exceptions.cc       30 May 2003 15:01:33 -0000      1.147
+++ exceptions.cc       7 Jun 2003 16:16:41 -0000
@@ -154,7 +154,7 @@ error_start_init (const char *buf)
   for (char *p = strchr (pgm, '\\'); p; p = strchr (p, '\\'))
     *p = '/';
 
-  __small_sprintf (debugger_command, "%s %s", buf, pgm);
+  __small_sprintf (debugger_command, "%s \"%s\"", buf, pgm);
 }
 
 static void

  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]