You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2006/11/16 21:51:00 UTC
svn commit: r475923 -
/incubator/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/hysignal.c
Author: gshimansky
Date: Thu Nov 16 12:51:00 2006
New Revision: 475923
URL: http://svn.apache.org/viewvc?view=rev&rev=475923
Log:
Applied HARMONY-2203 Asynchronous signal reporter is interrupted by an external signal while is waiting on a semaphore.
Tested this patch on a lot of platforms: Gentoo, FC5, Ubuntu5, SuSE10 x86_64 and even winXP which should not be affected. All drlvm tests passed except for SuSE10 x86_64 which isn't stable yet.
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/hysignal.c
Modified: incubator/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/hysignal.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/hysignal.c?view=diff&rev=475923&r1=475922&r2=475923
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/hysignal.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/hysignal.c Thu Nov 16 12:51:00 2006
@@ -25,6 +25,7 @@
#include <string.h>
#include <stdlib.h>
#include <assert.h>
+#include <errno.h>
#include <jsig.h>
@@ -918,7 +919,8 @@
/* Need an exit condition... */
for (;;)
{
- sem_wait (&wakeUpASynchReporter);
+ while (sem_wait(&wakeUpASynchReporter) == -1 && errno == EINTR)
+ ;
/* we get woken up if there is a signal pending or it is time to shutdown */
if (shutDownASynchReporter)