Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
2004-10-05  Dwayne Grant McConnell  <dgm69@us.ibm.com>

	* pthread.c: Mask restart signal during cancel signal handler.
  • Loading branch information
Ulrich Drepper committed Oct 6, 2004
1 parent f38a308 commit 67060ef
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions linuxthreads/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2004-10-05 Dwayne Grant McConnell <dgm69@us.ibm.com>

* pthread.c: Mask restart signal during cancel signal handler.

2004-10-05 Jakub Jelinek <jakub@redhat.com>

* sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
Expand Down
1 change: 1 addition & 0 deletions linuxthreads/pthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ static void pthread_initialize(void)
sa.sa_flags = 0;
__libc_sigaction(__pthread_sig_restart, &sa, NULL);
sa.sa_handler = pthread_handle_sigcancel;
sigaddset(&sa.sa_mask, __pthread_sig_restart);
// sa.sa_flags = 0;
__libc_sigaction(__pthread_sig_cancel, &sa, NULL);
if (__pthread_sig_debug > 0) {
Expand Down
6 changes: 6 additions & 0 deletions nptl/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2004-10-06 Ulrich Drepper <drepper@redhat.com>

* tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
test fails, remove message queue.
(tf_msgsnd): Likewise.

2004-10-05 Jakub Jelinek <jakub@redhat.com>

* tst-clock1.c: Change #ifdef to #if defined.
Expand Down
14 changes: 14 additions & 0 deletions nptl/tst-cancel4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,11 @@ static void *
tf_msgrcv (void *arg)
{
tempmsg = msgget (IPC_PRIVATE, 0666 | IPC_CREAT);
if (tempmsg == -1)
{
printf ("%s: msgget failed: %s\n", __FUNCTION__, strerror (errno));
exit (1);
}

int r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
Expand Down Expand Up @@ -1927,6 +1932,8 @@ tf_msgrcv (void *arg)

printf ("%s: msgrcv returned %zd with errno = %m\n", __FUNCTION__, s);

msgctl (tempmsg, IPC_RMID, NULL);

exit (1);
}

Expand All @@ -1940,6 +1947,11 @@ tf_msgsnd (void *arg)
abort ();

tempmsg = msgget (IPC_PRIVATE, 0666 | IPC_CREAT);
if (tempmsg == -1)
{
printf ("%s: msgget failed: %s\n", __FUNCTION__, strerror (errno));
exit (1);
}

int r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
Expand Down Expand Up @@ -1972,6 +1984,8 @@ tf_msgsnd (void *arg)

printf ("%s: msgsnd returned\n", __FUNCTION__);

msgctl (tempmsg, IPC_RMID, NULL);

exit (1);
}

Expand Down

0 comments on commit 67060ef

Please sign in to comment.