unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* compile kills background jobs undocumentedly
@ 2003-06-29 21:47 Dan Jacobson
  2003-12-21 21:19 ` Dan Jacobson
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Jacobson @ 2003-06-29 21:47 UTC (permalink / raw)


$ emacs --no-site-file -q -nw -eval '(compile "sleep 88&echo $!")'
But then ps aux shows you have killed sleep already, without waiting
my bleeding 88 seconds.  OK, but at least explain what you are doing
in C-h f compile, and Info.

BTW, in Info
      To kill the compilation process, do `M-x kill-compilation'.
Ok, do mention C-c C-k.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: compile kills background jobs undocumentedly
  2003-06-29 21:47 compile kills background jobs undocumentedly Dan Jacobson
@ 2003-12-21 21:19 ` Dan Jacobson
  2004-01-29  4:45   ` Dan Jacobson
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Jacobson @ 2003-12-21 21:19 UTC (permalink / raw)


Geez, the pains one must go to in a shell script run by the compile
command, to avoid any background jobs getting terminated when we reach
the bottom.

#didn't work:
sleep 3&&beep& #("beep" could be any command.)
sleep 3&&beep&disown
(sleep 3&&beep)&
(sleep 3&&beep)&disown
nohup sh -c 'sleep 3&&beep'&

#worked:
echo 'sleep 3&&beep'|nohup sh&
nohup sh -c 'sleep 3&&beep&'
echo 'sleep 3&&beep&'|nohup sh
nohup sh<<!
sh <<!! &
sleep 3&&beep
!!
!

nohup sh<<!
sleep 3&&beep&
!

OK, I suppose it is a nice place to practice making scripts hangup immune.

Dan> OK, but at least explain what you are doing in C-h f compile, and Info.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: compile kills background jobs undocumentedly
  2003-12-21 21:19 ` Dan Jacobson
@ 2004-01-29  4:45   ` Dan Jacobson
  2004-01-30 23:28     ` Kevin Rodgers
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Jacobson @ 2004-01-29  4:45 UTC (permalink / raw)


Muhahaha, this is how one can have a compile job not get killed, and
be able to do other compile jobs too:
$ cat makefile
book:
	trap '' 1; gv book.pdf&
It should be documented.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: compile kills background jobs undocumentedly
  2004-01-29  4:45   ` Dan Jacobson
@ 2004-01-30 23:28     ` Kevin Rodgers
  2004-02-01 23:48       ` Dan Jacobson
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Rodgers @ 2004-01-30 23:28 UTC (permalink / raw)


Dan Jacobson wrote:

> Muhahaha, this is how one can have a compile job not get killed, and
> be able to do other compile jobs too:
> $ cat makefile
> book:
> 	trap '' 1; gv book.pdf&
> It should be documented.

Really?  trap is a shell built-in; it makes the shell that runs the
Makefile command ignore the HUP signal, as does the gv process.  But the
Emacs kill-compilation command and the compile-internal utility call
interrupt-process, which sends the INT signal; compile-internal then
calls delete-process, which calls Fkill_process, which sends a QUIT
signal.  So I don't see why ignoring HUP would have any effect on that

sequence of actions.

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: compile kills background jobs undocumentedly
  2004-01-30 23:28     ` Kevin Rodgers
@ 2004-02-01 23:48       ` Dan Jacobson
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Jacobson @ 2004-02-01 23:48 UTC (permalink / raw)


K> ...calls delete-process, which calls Fkill_process, which sends a QUIT
K> signal.  So I don't see why ignoring HUP would have any effect on that
K> sequence of actions.

All I know is it works here on Debian.

BTW, every once in a while, in the standard compile situation, a
running job isn't noticed, and not asked about or killed, so we get a
concurrent 2nd job. Can't reproduce it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-02-01 23:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-29 21:47 compile kills background jobs undocumentedly Dan Jacobson
2003-12-21 21:19 ` Dan Jacobson
2004-01-29  4:45   ` Dan Jacobson
2004-01-30 23:28     ` Kevin Rodgers
2004-02-01 23:48       ` Dan Jacobson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).