You're viewing a comment by lava and its responses.

lava Permalink
September 11, 2012, 12:44

Warning: closing descriptors could cause some apps to fail, so be aware.
+-----------------------------------------------
|$ exec >&-
|-bash: echo: write error: Bad file descriptor
|-bash: echo: write error: Bad file descriptor
|$ ls
|ls: write error: Bad file descriptor
|-bash: echo: write error: Bad file descriptor
|$ echo $? >&2
|2
|-bash: echo: write error: Bad file descriptor
|-bash: echo: write error: Bad file descriptor
|

As you can see, not only error messages have been printed to the console, but ls also returned an error (2). This could be essential for scripts and I personally would recommend redirection to /dev/null.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "cloud_342": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.