This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: Make Cygwin damons easier to use on Win9x.
- To: cygwin-patches at cygwin dot com
- Subject: Re: Make Cygwin damons easier to use on Win9x.
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Tue, 26 Jun 2001 10:49:09 -0400
- References: <s1sithjcndc.fsf@jaist.ac.jp>
- Reply-To: cygwin-patches at cygwin dot com
On Tue, Jun 26, 2001 at 11:43:59PM +0900, Kazuhiro Fujieda wrote:
>The following patch makes Cygwin daemons more easier to use on Win9x.
>It allows daemons run without their console window and terminate
>silently without annoying us with the "End task" dialog twice.
>
>My patch against syscalls.cc isn't perfect. It doesn't consider the
>case where an application run on the tty mode or re-attach the
>console as its controlling terminal. But it works well practically.
>
>2001-06-26 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
>
> * syscalls.cc (setsid): Detach process from its console if
> the current controlling terminal is the console device.
> * exception.cc (ctrl_c_handler): Send SIGTERM to myself when catch
> CTRL_LOGOFF_EVENT.
I don't think it is appropriate to detach the console after a call to
setsid(). I have tested this on UNIX recently and I believe that a
program can continue to write to a tty after calling setsid().
cgf