Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!mcsun!ukc!edcastle!lfcs!kgg From: kgg@lfcs.ed.ac.uk (Kees Goossens) Newsgroups: comp.windows.x Subject: io redirect of xterm -e cmd Summary: where do stdin, stdout go? Message-ID: <3222@castle.ed.ac.uk> Date: 9 Apr 90 17:02:44 GMT Reply-To: kgg@lfcs.ed.ac.uk (Kees Goossens) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 26 I would like to redirect some of the output of a program I usually run as xterm -e program into a separate X window. Why doesn't the following work? { FILE *f; f = open ( "/tmp/zap", "w" ); system "/usr/local/bin/X11R4/xterm -e cat /tmp/zap"; ... here I use fprintf(f,...); for writing to that X window and fprintf(stdout,...); for writing to the X window in which the program was started ... fclose(f); } I gather xterm's stdin, and stdout are not the same as cat's. I don't really want lots of X wizardry in my program... Thanks, Kees ---- Kees Goossens Keep in Touch with the Dutch: LFCS, Dept. of Computer Science JANET: kgg@lfcs.ed.ac.uk University of Edinburgh UUCP: ..!ukc!lfcs!kgg Edinburgh EH9 3JZ, UK. ARPA: kgg%lfcs.ed.ac.uk@nsfnet-relay.ac.uk