diff options
Diffstat (limited to 'nptl/tst-cancel4-common.h')
-rw-r--r-- | nptl/tst-cancel4-common.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nptl/tst-cancel4-common.h b/nptl/tst-cancel4-common.h index e1683c435b..06ed0dc1ba 100644 --- a/nptl/tst-cancel4-common.h +++ b/nptl/tst-cancel4-common.h @@ -67,6 +67,22 @@ cl (void *arg) ++cl_called; } +/* Named pipe used to check for blocking open. It should be closed + after the cancellation handling. */ +static char fifoname[] = "/tmp/tst-cancel4-fifo-XXXXXX"; +static int fifofd; + +static void +__attribute__ ((used)) +cl_fifo (void *arg) +{ + ++cl_called; + + unlink (fifoname); + close (fifofd); + fifofd = -1; +} + struct cancel_tests { const char *name; |