How 'exec 1<&-; exec 2<&-' work?

Oleksandr Gavenko gavenko@bifit.com.ua
Fri Sep 3 08:48:00 GMT 2010


I develop gtk app under Windows and in order to run it I need start 
Cygwin X Windows.

To start X Windows I use Makefile rule:

.PHONY: cygwin-startx
cygwin-startx:
	XWin -multiwindow &

But when I invoke this target in native GNU Emacs
by M-x compile in *Compilation*  buffer I see XWin output and compilation
not complete. So next M-x compile Emacs prompt

   A compilation process is running; kill it? (yes or no)

I intuitively change command to

   exec 1<&-; exec 2<&-; XWin -multiwindow &

and now Emacs compilation finished and server work in background.

I really don't  understand what magic exec do.

Can anyone point me?


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list