repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git]
/
memcheck
/
tests
/
darwin
/
mkfifo.c
blob
e92e425475c58fbeab2602adf0f2781f8b4f0897
1
#include <stdio.h>
2
#include <stdlib.h>
3
4
#include <sys/syscall.h>
5
#include <unistd.h>
6
#include <fcntl.h>
7
8
#ifndef SYS_mkfifo
9
# define SYS_mkfifo 132
10
#endif
11
12
static char
f_name
[]=
"mkfifo_data_file"
;
13
14
int
mkfifo
(
const char
*
path
)
15
{
16
return
syscall
(
SYS_mkfifo
,
path
);
17
}
18
19
int
main
(
void
)
20
{
21
int
fd
;
22
23
fd
=
mkfifo
(
f_name
);
24
25
if
(
fd
== -
1
)
26
perror
(
"mkfifo"
),
exit
(
1
);
27
28
unlink
(
f_name
);
29
30
return
0
;
31
}