Redirect output file descriptor 3 (not just 1 and 2)

msk at afinitc.UUCP msk at afinitc.UUCP
Wed Nov 14 06:10:42 AEST 1984


Please pardon my ignorance, but I would like to know how  to  set
up  a  C  program to do output to a particular file descriptor so
that I  may  redirect  the  output  to  a  given  file.   (If  no
redirection  is  specified,  then  of  course  I  can output to a
default file)

I mean, how can I program the following:

    program > output 2> error 3> my_file
                              ----------

Please mail me responses and I will report  the  various  options
for code fragments to the net.

THANKS!
-- 
--  From the terminal of Morris Kahn  (...ihnp4!wucs!afinitc!msk)
--  Affinitec, Corp., 2252 Welsch Ind. Ct., St. Louis, MO 63146 (314)569-3450



More information about the Comp.lang.c mailing list