Generate temporary files with mkstemp instead of mktemp
MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
1103e0c1bc
commit
93b278f08d
@ -209,12 +209,12 @@ setup_pipe(const char *test, int *fdp)
|
||||
static void
|
||||
setup_fifo(const char *test, int *fdp)
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
char path[] = "0send_fifo.XXXXXXX";
|
||||
int fd1, fd2;
|
||||
|
||||
strcpy(path, "/tmp/0send_fifo.XXXXXXX");
|
||||
if (mktemp(path) == NULL)
|
||||
if (mkstemp(path) == -1)
|
||||
err(-1, "%s: setup_fifo: mktemp", test);
|
||||
unlink(path);
|
||||
|
||||
if (mkfifo(path, 0600) < 0)
|
||||
err(-1, "%s: setup_fifo: mkfifo(%s)", test, path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user