I'm trying to prevent a GUI program, which was started from the terminal, to write into the console. To do this, I run guiprogram >&-. This leads the program to freeze on some operations.
What does the >&- operator exactly do? What's the intended purpose of it? Can you give any examples? Is it legit to prevent writing into the console by the use of it? Why does the program freeze when closing the standard output?