Ken Brown <kbr...@cornell.edu> was heard to say:
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.
You're asking the right question here. I tried to trace back where the
"-ic" came from. I could find traces of this switch as early as 2004.
It was part of a setup which allowed to use Cygwin bash as a shell in
NTEmacs (the native GNU Emacs port, and back then the only way to have
a GNU Emacs GUI on Windows). I'm pretty sure that I copied the switch
from other sources, so I can't tell whether it was necessary back then
or if the "-i" part of it simply didn't hurt. Well, it didn't hurt
with Cygwin Emacs either until I set up my new box. But as you say,
both "-c" and "-lc" work without a problem. Thus omitting the "-i" is
probably not a workaround, but simply the proper way of doing things.
Thanks a lot for looking into this.
regards,
Markus
--
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38
--
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