changeset 2247:95427ba4245a

* src/signal.cxx (pause): Although already POSIX compliant, if we wait for all signals, behaviour is more Linux-like.
author jlarmour
date Tue, 18 Jul 2006 16:00:46 +0000
parents cf44f62361c7
children b6b5cdffa4cf
files packages/compat/posix/current/ChangeLog packages/compat/posix/current/src/signal.cxx
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/packages/compat/posix/current/ChangeLog
+++ b/packages/compat/posix/current/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-18  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* src/signal.cxx (pause): Although already POSIX compliant, if we wait
+	for all signals, behaviour is more Linux-like.
+
 2006-06-13  Dan Jakubiec  <dan.jakubiec@systech.com>
 
 	* src/time.cxx: (nanosleep): Fixed to return EINTR when it is
--- a/packages/compat/posix/current/src/signal.cxx
+++ b/packages/compat/posix/current/src/signal.cxx
@@ -10,6 +10,7 @@
 // This file is part of eCos, the Embedded Configurable Operating System.
 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
 // Copyright (C) 2002 Nick Garnett
+// Copyright (C) 2004 eCosCentric Ltd.
 //
 // eCos is free software; you can redistribute it and/or modify it under
 // the terms of the GNU General Public License as published by the Free
@@ -1068,12 +1069,9 @@ externC int pause( void )
 
     // Check for any pending signals that can be delivered and
     // if there are none, wait for a signal to be generated
-    if( !cyg_deliver_signals() )
+    while( !cyg_deliver_signals() )
         signal_sigwait.wait();
 
-    // Now check again for some signals to deliver
-    cyg_deliver_signals();
-    
     signal_mutex.unlock();
     
     SIGNAL_RETURN(EINTR);