File: [local] / OpenXM / src / util / Attic / oxpipe.c (download)
Revision 1.1, Mon Nov 17 00:30:08 2003 UTC (20 years, 7 months ago) by takayama
Branch: MAIN
A starting version ox oxpipe
oxpipe ox-server redirects fd 3 to 0 and fd 4 to 1.
So, it make the ox-server work as a pipe.
|
/* $OpenXM: OpenXM/src/util/oxpipe.c,v 1.1 2003/11/17 00:30:08 takayama Exp $ */
#include <stdio.h>
main(int argc,char *argv[]) {
dup2(0,3);
dup2(1,4);
dup2(2,0);
dup2(2,1);
if (argc < 2) {
fprintf(stderr,"oxpipe servername\n");
}
execl(argv[1],argv[1],NULL);
}