* We can't use string objects in signal handlers because they might

allocate memory, which is verboten in signal handlers.  This caused
  random failures in the test suite on Mac OS X (triggered by the spurious
  SIGPOLL signals on Mac OS X, which should also be fixed).
This commit is contained in:
Eelco Dolstra 2008-12-12 12:59:27 +00:00
parent 6776a52bb3
commit 9122dcecbb
1 changed files with 4 additions and 4 deletions

View File

@ -112,12 +112,12 @@ static void sigPollHandler(int sigNo)
_isInterrupted = 1;
blockInt = 1;
canSendStderr = false;
string s = "SIGPOLL\n";
write(STDERR_FILENO, s.c_str(), s.size());
char * s = "SIGPOLL\n";
write(STDERR_FILENO, s, strlen(s));
}
} else {
string s = "spurious SIGPOLL\n";
write(STDERR_FILENO, s.c_str(), s.size());
char * s = "spurious SIGPOLL\n";
write(STDERR_FILENO, s, strlen(s));
}
}
catch (Error & e) {