X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.3 required=5.0	tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_NEUTRAL
X-Spam-Check-By: sourceware.org
Message-ID: <4E8BC281.2070909@cornell.edu>
Date: Tue, 04 Oct 2011 22:35:45 -0400
From: Ken Brown <kbrown@cornell.edu>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: error while running shell in emacs
References: <20110930162705.Horde.SEW3ZruWis5OhdG5y5EHB8A@webmail.df.eu> <4E8BBCD6.8030904@cornell.edu>
In-Reply-To: <4E8BBCD6.8030904@cornell.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 10/4/2011 10:11 PM, Ken Brown wrote:
> On 9/30/2011 10:27 AM, Markus Hoenicka wrote:
>> CYGWIN_NT-5.1 sbhc123 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin
>>
>> I use some Emacs extensions which execute external programs using
>> (call-process). This used to work on my previous setup, but it fails on
>> my current box. The following command run in Emacs reproduces what seems
>> to be the problem:
>>
>> (call-process "bash" nil '(t t) nil "-ic" "ls -al")
>> bash: Kann die Prozessgruppe des Terminals nicht setzen (-1).:
>> Inappropriate ioctl for device
>> bash: Keine Job Steuerung in dieser Shell.
>
> Markus,
>
> Why are you calling bash with the -i option in this context? Your first
> `nil' causes bash's input to come from /dev/null. Does it make sense to
> have an interactive shell with input coming from /dev/null? If you
> remove -i and just run
>
> (call-process "bash" nil '(t t) nil "-c" "ls -al") ,
>
> it works fine with both cygwin 1.7.9 and the latest snapshot.
>
> Maybe there's still a Cygwin bug here; I tested your original command in
> Linux, and it worked. But omitting -i might at least be a workaround for
> you.

Replacing -i by -l also works:

(call-process "bash" nil '(t t) nil "-lc" "ls -al")


--
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

