diff packages/compat/posix/current/src/signal.cxx @ 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 22d367a6f8f2
children 74dbf4c3f2e1
line wrap: on
line diff
--- 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);