projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d19c6ff
)
fix shm subtest in cancellation points test
author
Alexander Monakov
<amonakov@ispras.ru>
Thu, 11 Sep 2014 15:33:36 +0000
(17:33 +0200)
committer
Szabolcs Nagy
<nsz@port70.net>
Thu, 11 Sep 2014 15:35:44 +0000
(17:35 +0200)
src/functional/pthread_cancel-points.c
patch
|
blob
|
history
diff --git
a/src/functional/pthread_cancel-points.c
b/src/functional/pthread_cancel-points.c
index
4cb50d2
..
eb7dac7
100644
(file)
--- a/
src/functional/pthread_cancel-points.c
+++ b/
src/functional/pthread_cancel-points.c
@@
-4,6
+4,7
@@
#include <semaphore.h>
#include <string.h>
#include <sys/mman.h>
+#include <fcntl.h>
#include "test.h"
#define TESTC(c, m) ( (c) || (t_error(#c " failed (%s, " m ")\n", cdescr), 0) )
@@
-85,9
+86,10
@@
static void execute_shm_open(void *arg)
static void cleanup_shm(void *arg)
{
int *fd = arg;
- if (*fd
!= -1)
+ if (*fd
> 0) {
TESTE(close(*fd), "shm fd");
- TESTE(shm_unlink("/testshm"), "");
+ TESTE(shm_unlink("/testshm"), "");
+ }
}
static struct {