[Gllug] Changing destination of shell output

Bernard Peek bap at shrdlu.com
Fri Oct 25 14:01:58 UTC 2002


In message <87u1jb4diz.fsf at amaterasu.srvr.nix>, Nix 
<nix at esperi.demon.co.uk> writes


>
>You can *look* at the fds via /proc, but you can't point them somewhere
>else. The problem is that an fd ismore than /proc shows you it is; it's
>also got a read/write state and a file position associated with it,
>and there's no way to point all of that to another file without
>closing the descriptor and reopening it (which the program would notice
>and which only the program has any way to do in any case --- that'd also
>break things if the descriptor was shared by other processes, as can be
>done by fork() or fd-passing over Unix-domain sockets).

I recall that this sort of thing was possible under MPE running on 
HP3000 minicomputers. You could override a program's choice of file, 
even if the name of the file was compiled in to the code.



-- 
Bernard Peek
bap at shrdlu.com
www.diversebooks.com: SF & Computing book reviews and more.....

In search of cognoscenti


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list