redirect standard error - BSD

This is a discussion on redirect standard error - BSD ; Ok, this may be really easy, but please help: If you have a program that has run amuk and it is continuously spitting out errors to the terminal, how do you redirect standard error to something other than the terminal ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: redirect standard error

  1. redirect standard error

    Ok, this may be really easy, but please help:

    If you have a program that has run amuk and it is continuously spitting
    out errors to the terminal, how do you redirect standard error to
    something other than the terminal --without-- restarting the program
    like : prog 2> /dev/null ?

    I just want to get rid of the output so I can use the terminal, or just
    redirect the error into a file, but I need to do it without restarting
    the program.

    Thanks


  2. Re: redirect standard error

    ga_obsd wrote:
    > Ok, this may be really easy, but please help:
    >
    > If you have a program that has run amuk and it is continuously spitting
    > out errors to the terminal, how do you redirect standard error to
    > something other than the terminal --without-- restarting the program
    > like : prog 2> /dev/null ?
    >
    > I just want to get rid of the output so I can use the terminal, or just
    > redirect the error into a file, but I need to do it without restarting
    > the program.


    Looks nontrivial to me. The most simple solution I can come up with is
    to connect stdout to a program that simply passes on data. Then, when
    you want to stop stdout, tell this program to stop passing stuff on
    (some sort of signal works best, and could even be used to re-enable
    it).

    Joachim

+ Reply to Thread