* DevNotes: Add entry cgf-000021.
* select.cc (select): Unconditionally return when a signal is detected. (select_stuff::wait): Ditto.
This commit is contained in:
		| @@ -1,3 +1,9 @@ | |||||||
|  | 2013-01-11  Christopher Faylor  <me.cygwin2013@cgf.cx> | ||||||
|  |  | ||||||
|  | 	* DevNotes: Add entry cgf-000021. | ||||||
|  | 	* select.cc (select): Unconditionally return when a signal is detected. | ||||||
|  | 	(select_stuff::wait): Ditto. | ||||||
|  |  | ||||||
| 2013-01-11  Corinna Vinschen  <corinna@vinschen.de> | 2013-01-11  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	* syscalls.cc (rename): Drop handling paths > 32757 chars, emit EINVAL | 	* syscalls.cc (rename): Drop handling paths > 32757 chars, emit EINVAL | ||||||
|   | |||||||
| @@ -1,3 +1,12 @@ | |||||||
|  | 2013-01-11  cgf-000021 | ||||||
|  |  | ||||||
|  | Apparently I got the signal handling semantics of select() wrong again | ||||||
|  | even though I would have sworn that I tested this on Linux and Windows. | ||||||
|  |  | ||||||
|  | select() is apparently *always* interrupted by a signal and *never* | ||||||
|  | restarts.  Hopefully, between the comment added to the code and this | ||||||
|  | note, I'll not make this mistake again. | ||||||
|  |  | ||||||
| 2013-01-02  cgf-000020 | 2013-01-02  cgf-000020 | ||||||
|  |  | ||||||
| (This entry should have been checked in with the changes but... I forgot) | (This entry should have been checked in with the changes but... I forgot) | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| /* globals.cc - Define global variables here. | /* globals.cc - Define global variables here. | ||||||
|  |  | ||||||
|    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, |    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, | ||||||
|    2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc. |    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc. | ||||||
|  |  | ||||||
| This file is part of Cygwin. | This file is part of Cygwin. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| /* select.cc | /* select.cc | ||||||
|  |  | ||||||
|    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | ||||||
|    2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc. |    2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc. | ||||||
|  |  | ||||||
| This file is part of Cygwin. | This file is part of Cygwin. | ||||||
|  |  | ||||||
| @@ -165,13 +165,12 @@ select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, | |||||||
| 	  { | 	  { | ||||||
| 	  case WAIT_SIGNALED: | 	  case WAIT_SIGNALED: | ||||||
| 	    select_printf ("signal received"); | 	    select_printf ("signal received"); | ||||||
| 	    if (_my_tls.call_signal_handler ()) | 	    /* select() is always interrupted by a signal so set EINTR, | ||||||
| 	      res = select_stuff::select_loop;		/* Emulate linux behavior */ | 	       unconditionally, ignoring any SA_RESTART detection by | ||||||
| 	    else | 	       call_signal_handler().  */ | ||||||
| 	      { | 	    _my_tls.call_signal_handler (); | ||||||
| 		set_sig_errno (EINTR); | 	    set_sig_errno (EINTR); | ||||||
| 		res = select_stuff::select_error; | 	    res = select_stuff::select_signalled; | ||||||
| 	      } |  | ||||||
| 	    break; | 	    break; | ||||||
| 	  case WAIT_CANCELED: | 	  case WAIT_CANCELED: | ||||||
| 	    sel.destroy (); | 	    sel.destroy (); | ||||||
| @@ -404,13 +403,12 @@ next_while:; | |||||||
| 	 be assured that a signal handler won't jump out of select entirely. */ | 	 be assured that a signal handler won't jump out of select entirely. */ | ||||||
|       cleanup (); |       cleanup (); | ||||||
|       destroy (); |       destroy (); | ||||||
|       if (_my_tls.call_signal_handler ()) |       /* select() is always interrupted by a signal so set EINTR, | ||||||
| 	res = select_loop; | 	 unconditionally, ignoring any SA_RESTART detection by | ||||||
|       else | 	 call_signal_handler().  */ | ||||||
| 	{ |       _my_tls.call_signal_handler (); | ||||||
| 	  set_sig_errno (EINTR); |       set_sig_errno (EINTR); | ||||||
| 	  res = select_signalled;	/* Cause loop exit in cygwin_select */ |       res = select_signalled;	/* Cause loop exit in cygwin_select */ | ||||||
| 	} |  | ||||||
|       break; |       break; | ||||||
|     case WAIT_FAILED: |     case WAIT_FAILED: | ||||||
|       system_printf ("WaitForMultipleObjects failed, %E"); |       system_printf ("WaitForMultipleObjects failed, %E"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user