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