1 /* vi: set sw=4 ts=4: */
3 * mkfifo implementation for busybox
5 * Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org>
7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
10 /* BB_AUDIT SUSv3 compliant */
11 /* http://www.opengroup.org/onlinepubs/007904975/utilities/mkfifo.html */
15 #include <sys/types.h>
17 #include "libcoreutils/coreutils.h"
19 int mkfifo_main(int argc, char **argv)
22 int retval = EXIT_SUCCESS;
24 mode = getopt_mk_fifo_nod(argc, argv);
26 if (!*(argv += optind)) {
31 if (mkfifo(*argv, mode) < 0) {
32 bb_perror_msg("%s", *argv); /* Avoid multibyte problems. */
33 retval = EXIT_FAILURE;