diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-06-09 01:21:18 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-06-09 01:21:18 +0000 |
commit | 88597edc095b5ea0ffa6de0a36488ac8e0c8378a (patch) | |
tree | 07f03bdbc365b8db540783f8fe34aaf5d008aa87 /ace/Signal.cpp | |
parent | 22604539276b2a231da98ee3a21b3fa1f9ee664d (diff) | |
download | ATCD-88597edc095b5ea0ffa6de0a36488ac8e0c8378a.tar.gz |
.
Diffstat (limited to 'ace/Signal.cpp')
-rw-r--r-- | ace/Signal.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/ace/Signal.cpp b/ace/Signal.cpp index 859076fcde1..16fd4fef9f5 100644 --- a/ace/Signal.cpp +++ b/ace/Signal.cpp @@ -320,8 +320,8 @@ ACE_Sig_Handler::dispatch (int signum, ACE_TSS_Guard<ACE_Recursive_Thread_Mutex> m (*lock)); #endif /* 0 */ - // Preserve errno across callbacks! - int old_errno = errno; + // Save/restore errno. + ACE_Errno_Guard error (errno); // We can't use the <sig_pending> call here because that acquires // the lock, which is non-portable... @@ -351,9 +351,6 @@ ACE_Sig_Handler::dispatch (int signum, eh->handle_close (ACE_INVALID_HANDLE, ACE_Event_Handler::SIGNAL_MASK); } - - // Restore error when callback completes. - errno = old_errno; } ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Sig_Action &sa, int sigkey) @@ -686,8 +683,8 @@ ACE_Sig_Handlers::dispatch (int signum, ACE_TSS_Guard<ACE_Recursive_Thread_Mutex> m (*lock)); #endif /* 0 */ - // Preserve errno across callbacks! - int old_errno = errno; + // Save/restore errno. + ACE_Errno_Guard error (errno); ACE_Sig_Handler::sig_pending_ = 1; @@ -709,9 +706,6 @@ ACE_Sig_Handlers::dispatch (int signum, delete *eh; } } - - // Restore error when callback completes. - errno = old_errno; } // Return the first item in the list of handlers. Note that this will |