delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/06/22/09:28:06

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: RE: SIGKILL and block_sig_dispatch
22 Jun 1998 09:28:06 -0700 :
Message-ID: <199806221558.LAA16166.cygnus.cygwin32.developers@kramden.cygnus.com>
To: sos AT prospect DOT com DOT ru
Cc: cygwin32-developers AT cygnus DOT com

If you just get rid of the WSACleanup and only use the close_all_files() in
do_exit (), does it still hang?

If so, and the close_all_files has to be executed in the context of the
signal thread, then, I think the patch below is better.  It is a minor
change to avoid closing all of the files again.

cgf

Index: exceptions.cc
===================================================================
RCS file: /cvs/cvsfiles/devo/winsup/exceptions.cc,v
retrieving revision 1.77
diff -u -r1.77 exceptions.cc
--- exceptions.cc	1998/06/15 15:54:30	1.77
+++ exceptions.cc	1998/06/22 15:55:58
@@ -648,14 +648,14 @@
 	continue;
 
     exit_sig:
-      if (i_WSACleanup)
-	(*i_WSACleanup) ();
+      close_all_files ();
       sigproc_printf ("signal %d, about to call do_exit\n", sig);
       /* We encode the signal stuff in the high 8 bits.
 	 (sorta like the reverse of a standard wait)
 	 This is so that ordinary dos progs can look at our
 	 exit value. */
-      rc = call_handler (sig, do_exit, (sig<<8) | EXIT_SIGNAL, (sigset_t) 0);
+      rc = call_handler (sig, do_exit, (sig<<8) | EXIT_SIGNAL | EXIT_NOCLOSEALL,
+		         (sigset_t) 0);
       goto done;
     }
 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019