delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/09/03/04:49:04

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS_WEB,RCVD_NUMERIC_HELO,SPF_HELO_PASS,TW_GT,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Oleksandr Gavenko <gavenko AT bifit DOT com DOT ua>
Subject: How 'exec 1<&-; exec 2<&-' work?
Date: Fri, 03 Sep 2010 11:47:59 +0300
Lines: 24
Message-ID: <i5qcns$7u6$1@dough.gmane.org>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019