Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site ucbvax.ARPA Path: utzoo!linus!decvax!tektronix!hplabs!ucbvax!wizard%wisdom.bitnet From: wizard%wisdom.bitnet@WISCVM.ARPA Newsgroups: net.unix-wizards Subject: more unix ideas Message-ID: <6954@ucbvax.ARPA> Date: Mon, 13-May-85 05:46:43 EDT Article-I.D.: ucbvax.6954 Posted: Mon May 13 05:46:43 1985 Date-Received: Mon, 10-Jun-85 06:23:38 EDT Sender: daemon@ucbvax.ARPA Organization: University of California at Berkeley Lines: 70 From: Mike Trachtman 1) have a swapfd system call Usage: swapfd(fd1,proc,fd2) or possibly: swapfd(proc1,fd1,proc2,fd2) what this does, is makes procs (usually another process) fd2, to become my fd1, and my fd1 to become (point to a file structure) of procs fd2. thus effectively these two processes have swapped fd's I think that this should be easy to implement in the system. This could be useful for the following purposes. 1) If I need more fd's then allowed, I could make a child process who would hold those fd's I currently do not need. 2) A change to the shell, so that a job while running (or stopped) could have its ouput redirected someplace else. for example, some program generated more output then expected, then I can suspend it, then redirect the output to a file or a pipe. with % fg %1 >file or % fg %1 | filter | ... & or % fg %1