Don't stop at first failure in mkfifo(1)

This commit is contained in:
sin 2014-11-22 11:18:05 +00:00
parent bf8e37625a
commit d0604cc474

View File

@ -17,6 +17,7 @@ main(int argc, char *argv[])
{
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP |
S_IWGRP | S_IROTH | S_IWOTH;
int ret = 0;
ARGBEGIN {
case 'm':
@ -29,8 +30,11 @@ main(int argc, char *argv[])
if (argc < 1)
usage();
for (; argc > 0; argc--, argv++)
if (mkfifo(argv[0], mode) < 0)
eprintf("mkfifo %s:", argv[0]);
return 0;
for (; argc > 0; argc--, argv++) {
if (mkfifo(argv[0], mode) < 0) {
weprintf("mkfifo %s:", argv[0]);
ret = 1;
}
}
return ret;
}