Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!columbia!garfield!ji From: ji@garfield.columbia.edu (John Ioannidis) Newsgroups: net.wanted.sources,net.unix,net.unix-wizards Subject: Re: new version of popen(3) Message-ID: <1433@garfield.columbia.edu> Date: Sun, 6-Apr-86 12:59:25 EST Article-I.D.: garfield.1433 Posted: Sun Apr 6 12:59:25 1986 Date-Received: Wed, 9-Apr-86 22:18:24 EST References: <201@dcc1.UUCP> Distribution: net Organization: Columbia University CS Department Lines: 43 Xref: watmath net.wanted.sources:2119 net.unix:7572 net.unix-wizards:17500 In article <201@dcc1.UUCP>, douglas@dcc1.UUCP (Douglas B. Jones) writes: > > Hi, > > In the routine popen(3), a program can open either a read pipe > or a write pipe to a sub-process (usually a program, like more). > Does any one have a similar routine that will allow a person to > have a read/write pipe to a sub-process. .... > This would be a very helpful program. I imagine it would have > to deal with sockets(). Quite some time ago I had posted to net.unix-wizards my version of a read-and-write popen. It had a slightly different calling sequence, and used pty's instead of either pipes or socketpairs. This has some advantages, like being able to get back prompts from the child process; some programs check isatty(1) and don't output a prompt if it is not. (for example, ftp(1)). Anyway, check older postings for my program. > What would be really nice, is if two version > of this popen2() could be written. One to allow the calling program > to work with a child process on the local system, and secondly to > allow it (the calling program) to work with a child process on > another system (in the local network). > I guess, you can just use /usr/ucb/rsh instead of /bin/sh for the shell in popen or whatever. This also takes care of security; you won't have to implement Yet Another security/user authorization/whatever scheme. Hope all that helps, - john #include VOICE: +1 212 280 5510 ARPA: ioannidis@cs.columbia.EDU USnail: John Ioannidis ji@garfield.columbia.EDU 450 Computer Science Columbia University, USENET: ...{seismo|topaz}! New York, NY 10027 columbia!garfield!ji ... It's all Greek to me!