diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-10-06 09:09:35 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-10-06 09:09:35 +0000 |
commit | 0caba1fbdb2bb0d78bbf3a9cf4d227ad1c1f8f86 (patch) | |
tree | f86a1435f78ca214fb24daf9ba7a85f3dfd1ff54 /nptl/tst-cancel4.c | |
parent | 6fb78a87583a6d2f65a0fb4a77c950ddc037876c (diff) | |
download | glibc-0caba1fbdb2bb0d78bbf3a9cf4d227ad1c1f8f86.tar.gz glibc-0caba1fbdb2bb0d78bbf3a9cf4d227ad1c1f8f86.tar.xz glibc-0caba1fbdb2bb0d78bbf3a9cf4d227ad1c1f8f86.zip |
Updated to fedora-glibc-20041006T0900
Diffstat (limited to 'nptl/tst-cancel4.c')
-rw-r--r-- | nptl/tst-cancel4.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nptl/tst-cancel4.c b/nptl/tst-cancel4.c index 8dc8aec0af..c3e527fd1c 100644 --- a/nptl/tst-cancel4.c +++ b/nptl/tst-cancel4.c @@ -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) @@ -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); } @@ -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) @@ -1972,6 +1984,8 @@ tf_msgsnd (void *arg) printf ("%s: msgsnd returned\n", __FUNCTION__); + msgctl (tempmsg, IPC_RMID, NULL); + exit (1); } |