This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: what's left for 1.5.0
Corinna,
On Wed, Jun 11, 2003 at 11:43:01AM +0200, Corinna Vinschen wrote:
> On Tue, Jun 10, 2003 at 04:35:26PM -0400, Jason Tishler wrote:
> > Are you willing to do the "honors"? Or, would you like me to submit
> > patches for the DLL and/or inetd?
>
> It's easy enough to change Cygwin.
OK, but should we still apply the ctrl_c_handler() patch? I think we
should, but my confidence has been shaken by your and my findings
below...
> I just don't quite see why inetd should get patched. Inetd doesn't
> have a need to clean up and it has no handling to send signals to its
> children so far. Do you think it should?
No, I was just offering for completeness. Since I proposed removing the
SIGTERM handling from Cygwin, I thought that it was only fair to offer
to "fix" any official known Cygwin daemon to be affected by this change.
> In that case it would just send SIGTERM to all processes in the same
> process group. Is that what you're suggesting?
Yes.
> Somehow that's the same as still having the CTRL_SHUTDOWN_EVENT
> handled in Cygwin ;-)
Yes, but at least inetd gets to decide how it responds to
CTRL_SHUTDOWN_EVENT.
> Btw., if MSDN is right that only service processes get a
> CTRL_SHUTDOWN_EVENT message, how comes that postmaster started from
> cygrunsrv also gets a SIGTERM?
Good question.
> Is MSDN wrong or better, is it not thouroughly enough describing what
> happens?
I think the latter, see below...
> I examined the behaviour of sshd on shutdown.
>
> [snip]
>
> So CTRL_SHUTDOWN_EVENT actually is send also to the services child
> processes.
I just tried running sshd directly under the LocalSystem account (using
the "at $TIME /interactive cmd" trick). I got the following EventLog
entry:
[13956] sshd
Type: INFORMATION
Computer: TISHLERJASON
Time: 6/11/2003 2:14:27 PM ID: 0
User: SYSTEM\NT AUTHORITY
sshd : PID 2860 : Received signal 15; terminating.
So, it appears that even normal apps receive CTRL_SHUTDOWN_EVENT during
shutdown. Sigh...
> So far so good but what about Cygwin applications started from a
> non-Cygwin service starter like SRVANY? If anybody is using that one,
> say, because an application is not behaving "cygrunsrv aware" (forks
> and execs for instance), then all these processes don't have a chance
> to clean up. What's our answer to this one? Don't do that?
Sounds good to me!
Thanks,
Jason
--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6