Annotation of OpenXM/src/kxx/oxpipe.c, Revision 1.2
1.2 ! ohara 1: /* $OpenXM: OpenXM/src/kxx/oxpipe.c,v 1.1 2003/11/19 00:43:18 takayama Exp $ */
1.1 takayama 2: #include <stdio.h>
1.2 ! ohara 3: #include <unistd.h>
1.1 takayama 4:
1.2 ! ohara 5: int
1.1 takayama 6: main(int argc,char *argv[]) {
7: dup2(0,3);
8: dup2(1,4);
9: dup2(2,0);
10: dup2(2,1);
11:
12: if (argc < 2) {
13: fprintf(stderr,"oxpipe servername\n");
14: }
1.2 ! ohara 15: if (argc >=2 && argc <= 5) execv(argv[1], argv+1);
1.1 takayama 16: if (argc > 5) {fprintf(stderr,"Too many args\n"); exit(10);}
17: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>