5748461 [rkeene@sledge /home/rkeene/devel/mooselinux-0.0.19/src]$ cat -n mkfifo.c
 1 #include <stdio.h>
 2 #include <unistd.h>
 3 #include <stdlib.h>
 4 #include <sys/types.h>
 5 #include <sys/stat.h>
 6 #include <fcntl.h>
 7 #include "version.h"
 8 #include "mkfifo.h"
 9 
10 int mkfifo_main (int argc, char **argv) {
11     int i;
12     int error_code=0;
13 
14     if (argc==1) error_code=-1;
15 
16     for (i=1;i<argc;i++) {
17         if (mknod(argv[i], S_IFIFO|0666, 0)<0) {
18             write(STDERR_FILENO, "mkfifo: ", 8);
19             perror(argv[i]);
20             error_code=-1;
21         }
22     }
23     return(error_code);
24 }
5748462 [rkeene@sledge /home/rkeene/devel/mooselinux-0.0.19/src]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2000-04-29 03:36:37