Path: utzoo!utgpu!jarvis.csri.toronto.edu!me!ip From: ip@mill.me.toronto.edu () Date: Sun Aug 28 22:14:20 EDT 1988 Message-ID: <17075.1988Aug28.22:14:21@mill.me.toronto.edu> Organization: University of Toronto Mechanical Engineering Newsgroups: comp.unix.questions Subject: Need help on rexec/rcmd socket i/o Distribution: world Can someone give me a hand on this?? The following are what my programs are doing. I would apprecicate it if someone could explain to me how communication is done through the socket and what actually does FIONBIO do to the socket. Thank you in advance. /bevis Side A: read from stdin until EOF write to stdout exit Side B: (Problem : couldn't read the output from Side A) sock = rexec(..., 0); ioctl(sock, FIONBIO, &one); write(sock, buf, BUFSIZ); write(sock, "\0377", 1); while((i = read(sock, buf, BUFSIZ)) > 0) write(1, buf, i); Also tried: (same problem) sock = rexec(..., 0); for(;;) { rfd = wfd = 1< 0) write(1, buf, i); break; } } -- Bevis Ip University of Toronto, Dept. of Mechanical Engineering CSNET : ip@me.toronto.edu BITNET: ip@me.UTORONTO ARPA : ip%me.toronto.edu@relay.cs.net UUCP : {allegra,decwrl,decvax!utcsri pyramid,uunet!utai}!me!ip