2 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
18 #define move(x, y) close(y); dup(x); close(x);
23 corout(char *in
, char *out
, char *rprog
, char *arg
, int outlen
)
25 int pipev
[2], fr1
, fr2
, fw1
, fw2
, n
;
39 execl(rprog
, "deliv", arg
, 0);
40 err("Can't run %s", rprog
);
44 write(fw1
, in
, strlen(in
));
47 n
= read(fr2
, out
, outlen
);