bashemacsdebian

Emacs shell-command outputting "cannot set terminal process group" and "no job control in this shell"


When I run shell-command in Emacs on Debian 6.0 (Squeeze), e.g.

(shell-command "ls")

the output is preceded with

bash: cannot set terminal process group (-1): Invalid argument
bash: no job control in this shell

This is particularly annoying when applying a shell command (e.g. perltidy) to a buffer, as those lines end up on the top of the buffer.

This is a newly installed Debian 6.0 (Squeeze) system with the latest emacs from apt-get.

% uname -a
Linux 2.6.32-5-xen-amd64 #1 SMP Tue Mar 8 00:01:30 UTC 2011 x86_64 GNU/Linux
% emacs --version
GNU Emacs 23.2.1
% dpkg -l | grep emacs
ii  emacs                                   23.2+1-7
ii  emacs23                                 23.2+1-7 
ii  emacs23-bin-common                      23.2+1-7 
ii  emacs23-common                          23.2+1-7 
ii  emacsen-common                          1.4.22

Happy to provide other information as needed. Thanks!


Solution

  • Never mind, it was because of this:

    (set-variable 'shell-command-switch "-ic")