Fix sigaction(3) for 64-bit.

Also clean up <signal.h> and revert the hacks that were necessary
for 64-bit in linker/debugger.cpp until now.

Change-Id: I3b0554ca8a49ee1c97cda086ce2c1954ebc11892
This commit is contained in:
Elliott Hughes
2013-10-16 22:27:54 -07:00
parent f89f1eaa60
commit c7e9b23317
20 changed files with 358 additions and 126 deletions

View File

@@ -284,11 +284,13 @@ static void pthread_kill__in_signal_handler_helper(int signal_number) {
TEST(pthread, pthread_kill__in_signal_handler) {
struct sigaction action;
struct sigaction original_action;
sigemptyset(&action.sa_mask);
action.sa_flags = 0;
action.sa_handler = pthread_kill__in_signal_handler_helper;
sigaction(SIGALRM, &action, NULL);
ASSERT_EQ(0, sigaction(SIGALRM, &action, &original_action));
ASSERT_EQ(0, pthread_kill(pthread_self(), SIGALRM));
ASSERT_EQ(0, sigaction(SIGALRM, &original_action, NULL));
}
TEST(pthread, pthread_detach__no_such_thread) {