GNU bug report logs - #3608
BG processes killed by start-process

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Thu, 18 Jun 2009 18:10:09 UTC

Severity: normal

Done: Andreas Schwab <schwab <at> linux-m68k.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#3608: closed (BG processes killed by start-process)
Date: Sat, 17 Sep 2011 07:04:04 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 17 Sep 2011 08:58:18 +0200
with message-id <m28vpnwt85.fsf <at> linux-m68k.org>
and subject line Re: bug#3608: BG processes killed by start-process
has caused the debbugs.gnu.org bug report #3608,
regarding BG processes killed by start-process
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
3608: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3608
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: JD Smith <jdtsmith <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: BG processes killed by start-process
Date: Thu, 18 Jun 2009 14:03:41 -0400
Start-process seems to kill off child processes of which have been put  
into the background.

Create a small shell script "bgtest":

#!/bin/sh
sleep 121 &
exit 0

and now

(start-process "BGTEST" nil "bgtest")

Notice that the sleep process has been killed, rather than waited on.

Is this the intended behavior?  Any thoughts for preventing it (other  
than modifying the script, which I don't control)?

Thanks.



----------------


In GNU Emacs 22.3.1 (i386-apple-darwin9.6.0, Motif Version 2.3.1)
 of 2009-04-29 on terrapin
Windowing system distributor `The X.Org Foundation', version  
11.0.10402000
configured using `configure  '--prefix=/opt/local' '--without-carbon'  
'--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '-- 
with-x-toolkit=motif' 'CC=/usr/bin/gcc-4.0' 'CFLAGS=-O2' 'LDFLAGS=-L/ 
opt/local/lib' 'CPPFLAGS=-I/opt/local/include' 'CPP=/usr/bin/cpp-4.0''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Shell-script

Minor modes in effect:
  TeX-source-specials-mode: t
  which-function-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: identity

Recent input:
<backspace> <backspace> <backspace> <backspace> <backspace>
/ h o m e / j d s m i t h / b i n / b g t e s t " )
<return> <down-mouse-1> <mouse-1> M-: <up> <help-echo>
<down-mouse-3> <mouse-3> <down-mouse-1> <mouse-movement>
<mouse-movement> <drag-mouse-1> <switch-frame> <down-mouse-1>
<mouse-movement> <mouse-1> C-x C-f C-g C-x C-f <M-backspace>
<M-backspace> b i n / b g <tab> t <tab> e <tab> C-x
C-f C-a <right> <right> C-k b i n / t e <tab> <return>
<down> <down> <down> <down> <up> <down> <return> <up>
d i s o w n SPC $ $ C-x C-s M-: <up> <return> <down-mouse-1>
<mouse-1> <backspace> <backspace> % % C-x C-s <down-mouse-1>
<mouse-1> M-: <up> <return> <down-mouse-1> <mouse-1>
<up> C-a C-k C-k C-x C-s <down-mouse-1> <mouse-1> <backspace>
C-x C-s M-: <up> <return> <down-mouse-1> <mouse-1>
M-: <up> C-e <left> <left> <left> <left> <left> <left>
<left> <left> <left> <right> <right> <right> <backspace>
<backspace> <right> <right> <right> <right> b g <return>
<down-mouse-1> <mouse-movement> <mouse-1> M-: <up>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <return> <down-mouse-1> <mouse-1> M-: <up>
<right> <right> <right> C-h f d <return> C-g C-h f
<return> <right> <down> <up> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> M-d M-d M-d C-d C-e <return> <switch-frame>
<switch-frame> <down-mouse-1> <mouse-movement> <mouse-1>
M-x p r o c <tab> C-h a p r o c e s s <return> M-x
l i s t - p r <tab> <return> <help-echo> <help-echo>
<down-mouse-1> <mouse-1> M-x e m a c s - C-a C-k r
e p <tab> o <tab> r <tab> <return>

Recent messages:
#<process BGTEST> [3 times]
Making completion list...
Quit
Type C-x 1 to remove help window.
#<process BGTEST>
Quit
Loading apropos...done
Type C-x 1 to remove help window.
Making completion list... [2 times]
Loading emacsbug...done


--
 J.D. Smith                  <==> http://tir.astro.utoledo.edu/jdsmith
 Ritter Observatory, MS 113  <==> 419-530-8528 <W>
 University of Toledo        <==> 419-530-5167 <F>
 Toledo, OH 43606            <==>



[Message part 3 (message/rfc822, inline)]
From: Andreas Schwab <schwab <at> linux-m68k.org>
To: JD Smith <jdtsmith <at> gmail.com>
Cc: 3608-done <at> debbugs.gnu.org
Subject: Re: bug#3608: BG processes killed by start-process
Date: Sat, 17 Sep 2011 08:58:18 +0200
JD Smith <jdtsmith <at> gmail.com> writes:

> Start-process seems to kill off child processes of which have been put
> into the background.
>
> Create a small shell script "bgtest":
>
> #!/bin/sh
> sleep 121 &
> exit 0
>
> and now
>
> (start-process "BGTEST" nil "bgtest")
>
> Notice that the sleep process has been killed, rather than waited on.

That's not a bug.  The session created for the process is closed when
the process exits, which causes the kernel to send SIGHUP to all
remaining processes in the session.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


This bug report was last modified 13 years and 256 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.