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 Thu, Jul 12, 2001 at 12:39:13AM +0900, Kazuhiro Fujieda wrote:
>I had enjoyed my daemon patch for a while. I found detaching
>the console worked fine and cause no undesirable side effect,
>while the ctrl_c_handler caused an undesirable effect.
>It terminated Cygwin processes running as services on NT/2000
>when an user logged off. So I fixed it.

I'm slowly crawling out of my vacation hole, and had some time to look
at this patch while I was in the middle of multiple phone meetings.

Anyway, I've applied this patch.  I was a little reluctant to change the
behavior of the CTRL_SHUTDOWN_EVENT since it has been like this for some
time.

However, if you want to make an omelette...

Nice patch, by the way.  I like the way you did this, Kazuhiro.

cgf

>2001-07-12  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
>
>	* syscalls.cc (setsid): Detach process from its console if
>	the current controlling tty is the console and already closed.
>	* dtable.h (class dtable): Add members to count descriptors
>	referring to the console.
>	* dtable.cc (dtable::dec_console_fds): New function to detach
>	process from its console.
>	(dtable::release): Decrement the counter of console descriptors.
>	(dtable::build_fhandler): Increment it.
>	* exception.cc (ctrl_c_handler): Send SIGTERM to myself when catch
>	CTRL_SHUTDOWN_EVENT.


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