2023-10-04 20:00:50 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <stdlib.h>
|
2023-10-04 20:05:52 +03:00
|
|
|
#include <string.h>
|
2023-10-04 20:00:50 +03:00
|
|
|
#include <sys/stat.h>
|
|
|
|
|
|
|
|
int main(const int argc, const char **argv) {
|
|
|
|
if (argc == 1) {
|
|
|
|
printf("mkfifo: missing operand\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 1; i < argc; i++) {
|
|
|
|
if (mkfifo(argv[i], 0666)) {
|
|
|
|
fprintf(stderr, "mkfifo: %s %s\n", argv[i], strerror(errno));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|