in reply to Re^2: Using warn() when STDERR is closed
in thread Using warn() when STDERR is closed
Still, it's a little weird that it only prints to file descriptor 2 (hard-wired), if STDERR is closed.Uhm, the kernel itself doesn't know anything about stderr. It's a convention used by utilities. And the convention is, "file descriptor 2 is stderr". (Just as file descriptor 1 is stdout, and file descriptor 0 is stdin).
Making the file descriptor variable would break many things, not in the least the expectation of users.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Using warn() when STDERR is closed
by almut (Canon) on Jul 15, 2010 at 18:39 UTC | |
by tye (Sage) on Jul 17, 2010 at 17:36 UTC |