Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!midway!iitmax!demoakt From: demoakt@iitmax.iit.edu (Avinash K Taparia) Newsgroups: comp.windows.x Subject: X and capturing stdout and stderr from a system(3S) call Keywords: X motif Message-ID: <1991Mar20.172535.18717@iitmax.iit.edu> Date: 20 Mar 91 17:25:35 GMT Organization: Illinois Institute of Technology / Academic Computing Center Lines: 24 I am developing a graphical user interface using X, motif, and unix I want to capture the information printed to stdout and stderr. the info is printed by a system(3S) function call from one of the callbacks. the system function call invokes an executable which prints to stdout and stderr. I tried the XtAddInput() function. This is what i did XtAddInput(fileno(stdin),XtInputReadMask,get_file_input,NULL); I thought this would work assuming that the stdout of the system function that i make from one of the call backs is the stdin for the graphical user interface. I also tried the popen command and passed the fid to XtAddInput. fid = popen(command,"r"); XtAddInput(fileno(fid),XtInputReadMask,......... Any help with this please and also more information on the other masks with example would be appreciated. The other masks like XtInputExceptMask ...... thanks