#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#define FIFO "./myfifo"
main(int argc, char **argv){
	int pid,fd;
	if(argc < 2){
		printf("usage: %s cmd\n",argv[0]);
		exit(0);
		}
	unlink(FIFO);
	mknod(FIFO,S_IFIFO|0666,0);
	close(0);	/* close stdin */
	fd=open(FIFO,O_RDONLY,O_EXCL);
	system(argv[1]);
	}

