Package: emacs21-common
Version: 21.4a-1
Severity: normal

When I use Mx-compile with a compile command of "ant -emacs", the
compilation sometimes fails with this message:

  Compilation exited abnormally with code 129 at Thu Jul 21 15:46:25

This occurs mainly when the task involves running a Java application,
like for example unit textings with the <junit> task. Here are two sample
files that reproduce the problem, put them in an empty directory and try
M-x compile with "ant -emacs" as the compile command.

   ----- file build.xml ----
   <?xml version="1.0"?>
   <project name="emacs-bash-ant" basedir="." default="all">
     <target name="all" >
       <javac srcdir="." destdir="."/>
       <java fork="yes" classname="Main" classpath="."/>
     </target>
   </project>
   ---- file build.xml ---

   ---- file Main.java ----
   public class Main {
     public static void main(String[] args) {
         System.exit(0);
     }
   }
   ---- file Main.java ----

The problem does *not* occur if I run the compilation myself with the
command:
  ant -emacs

However, I tried to "strace -p xxxx -f -F" the running emacs and think I
found that one of the threads in the bash interpeter performed a system
call like "exit_group(129)". So I suspected bash was responsible for
this, so I tried to launch the compilation almost as emacs did:
  /bin/bash -c "ant -emacs" < /dev/null
There was no problem and the compilation performed successfully. Another
test I tried was to customize the shell-file-name variable for the
current emacs session only to /bin/ksh. This removed the problem.

So I think the problem is either somewhere in the way emacs launches
bash (the call-process builtin function seems to do weird things with
pseudo terminals before the shell is executed) or in the bash code
itself. I register this bugs with emacs as launching the command
directly from a terminal with bash does not triggers the problem.

The bash version I have installed is 2.05b-26 and the ksh version is
pdksh is 5.2.14-18. I use the SUN jdk 1.4.2_08-b03.

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8lehrin4
Locale: LANG=fr_FR, LC_CTYPE=fr_FR (charmap=ISO-8859-1)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to