Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!mace.cc.purdue.edu!abe From: abe@mace.cc.purdue.edu (Vic Abell) Newsgroups: comp.sys.next Subject: loginwindow applications and pipes Message-ID: <1797@mace.cc.purdue.edu> Date: 22 Feb 89 16:28:56 GMT Organization: Purdue University Lines: 11 I've been conducting some experiments with processes that are begun right after login by loginwindow and before the Workspace manger (they're started by using "dwrite loginwindow Workspace "). I've learned a trick about the standard I/O file descriptors that is worth passing on: processes launched from loginwindow have only a stdin, and neither a stdout nor a stderr. So, if your application is using a pipe to some other application - e. g., to /etc/disk - you can't use the usual pipe/dup2/close techniques, because you may accidentally close one of the pipe descriptors that you need. First you should open /dev/null and dup2 it to stdout and sterr, then use pipe, dup2 and close in their normal order.