From: jeffdb AT netzone DOT com ("Mikey") Subject: Re: Signal handling for cygwin.dll 3 Apr 1997 14:50:57 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199704031940.MAA02756.cygnus.gnu-win32@nz1.netzone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Original-To: "Sergey Okhapkin" Original-Cc: "cygnus" X-MSMail-Priority: Normal X-Priority: 3 X-Mailer: Microsoft Internet Mail 4.70.1155 Original-Sender: owner-gnu-win32 AT cygnus DOT com If You can figure out why this works, we're in business. On my Win95 box. I made the following changes to exceptions.cc after applying your Signal handling patch. this eliminated the segv. start bash press C untill your fingers get tired ;^) start an app press C once, you will get a message box popup BASH caused an invalid page fault in module BASH.EXE at XXXX.XXX lose the message box the foreground app is dead, and the bash prompt comes back!!!!!!!!!!!!!!!!!! I realize that this messes up exception handling, so it is probably not a good permanent solution. PS. just eliminaging k++; and if(k == 13), dosen't work, it kills bash immediatly. if(sig == SIGINT) k++; if (k == 13) { /* We are going down - reset our inuse_p. */ u->self->record_death(); ExitProcess (0); } /* FIXME: The original version had code here to reinitialize the exception handler under the guise of initializing thread exceptions. It's not clear what this code was ever intended to do. */ /* debug_printf ("ctrl_c_handler: returning 1\n"); */ /* return 1; */ debug_printf ("ctrl_c_handler: returning 0\n"); return 0; } ---------- > From: Sergey Okhapkin > To: 'Gnu-Win32' > Cc: 'Geoffrey Noer' > Subject: Signal handling for cygwin.dll > Date: Tuesday, April 01, 1997 5:09 AM > > Hi! > > This patch adds interprocess signals support with (almost :-) unix > semantics for cygwin.dll while running on Windows NT. The only supported > signal on Windows 95 is SIGKILL, because of Win32 API call > CreateRemoteThread() is not supported on W95, and I don't see any way to > implement signals without this call easy... This patch also includes my > "Ctrl-C in bash" patch. Any bug reports/improvements are welcome. To test > this patch I've used the following simple program: > > kill.c: > #include > #include > #include > > static void > usage (); > > int > main (int ac, char **av) > { > int i=1, sig=SIGKILL; > > if (ac > == 1) > usage (); > if (av[1][0] == '-') { > sig = -atoi(av[1]); > > i++; > } > for (; i < ac; ++i) > { > int pid = atoi (av[i]); > > printf ("Killing %d with %d\n", pid, sig); > kill(pid, sig); > > } > return 0; > } > > static void > usage () > { > fprintf (stderr, "Usage: kill > [-SigNum] pid1 [pid2 ...]\n"); > exit (1); > } > ------------------------ > BTW, prototype for kill() is missed in ... > > > > > -- > Sergey Okhapkin > Moscow, Russia > Looking for a job. > > > - > For help on using this list, send a message to > "gnu-win32-request AT cygnus DOT com" with one line of text: "help". - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".