2011-05-25 06:00:15 -04:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include "util.h"
|
|
|
|
|
2013-06-14 14:20:47 -04:00
|
|
|
static void
|
|
|
|
usage(void)
|
|
|
|
{
|
|
|
|
eprintf("usage: %s name...\n", argv0);
|
|
|
|
}
|
|
|
|
|
2011-05-25 06:00:15 -04:00
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
2013-06-14 14:20:47 -04:00
|
|
|
ARGBEGIN {
|
|
|
|
default:
|
|
|
|
usage();
|
|
|
|
} ARGEND;
|
2013-08-31 18:04:49 -04:00
|
|
|
|
|
|
|
if (argc < 1)
|
|
|
|
usage();
|
|
|
|
|
2013-06-14 14:20:47 -04:00
|
|
|
for(; argc > 0; argc--, argv++) {
|
|
|
|
if(mkfifo(argv[0], S_IRUSR|S_IWUSR|S_IRGRP|\
|
|
|
|
S_IWGRP|S_IROTH|S_IWOTH) == -1) {
|
|
|
|
eprintf("mkfifo %s:", argv[0]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
2011-05-25 06:00:15 -04:00
|
|
|
}
|
2013-06-14 14:20:47 -04:00
|
|
|
|