This is the mail archive of the cygwin-patches@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]

Re: Make Cygwin damons easier to use on Win9x.


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


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