all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problems stopping simulations in emacs shells
@ 2005-07-12 17:56 Benjamin Bobich
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Bobich @ 2005-07-12 17:56 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 338 bytes --]

Hello,

I am running ncsim in an emacs shell and I'm not able to Ctrl C, D, break 
or anything out of simulations once they start.  When I run the 
simulations on a terminal, Ctrl C, pressed twice, normally stops the sim. 
Any advice on how to fix this problem? 

Thanks,
Benjamin Bobich
Philips Semiconductors
Benjamin.Bobich@philips.com

[-- Attachment #1.2: Type: text/html, Size: 499 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: Problems stopping simulations in emacs shells
       [not found] <mailman.2971.1121191732.2857.help-gnu-emacs@gnu.org>
@ 2005-07-12 18:39 ` Johan Bockgård
  2005-07-12 19:03   ` J. David Boyd
       [not found]   ` <mailman.2977.1121196281.2857.help-gnu-emacs@gnu.org>
  2005-07-13 10:51 ` Thien-Thi Nguyen
  1 sibling, 2 replies; 5+ messages in thread
From: Johan Bockgård @ 2005-07-12 18:39 UTC (permalink / raw)


Benjamin Bobich <benjamin.bobich@philips.com> writes:

> I am running ncsim in an emacs shell and I'm not able to Ctrl C, D,
> break or anything out of simulations once they start. When I run the
> simulations on a terminal, Ctrl C, pressed twice, normally stops the
> sim. Any advice on how to fix this problem?

C-c C-c runs `comint-interrupt-subjob', so maybe you could try that
twice. Likewise C-c C-d is `comint-send-eof' and C-c C-z is
`comint-stop-subjob'.

-- 
Johan Bockgård

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

* Re: Problems stopping simulations in emacs shells
  2005-07-12 18:39 ` Johan Bockgård
@ 2005-07-12 19:03   ` J. David Boyd
       [not found]   ` <mailman.2977.1121196281.2857.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: J. David Boyd @ 2005-07-12 19:03 UTC (permalink / raw)


bojohan+news@dd.chalmers.se (Johan Bockgård) writes:

> Benjamin Bobich <benjamin.bobich@philips.com> writes:
>
>> I am running ncsim in an emacs shell and I'm not able to Ctrl C, D, break
>> or anything out of simulations once they start. When I run the simulations
>> on a terminal, Ctrl C, pressed twice, normally stops the sim. Any advice on
>> how to fix this problem?
>
> C-c C-c runs `comint-interrupt-subjob', so maybe you could try that
> twice. Likewise C-c C-d is `comint-send-eof' and C-c C-z is
> `comint-stop-subjob'.
>
> -- 
> Johan Bockgård


And sometimes I've found that I need to hit Ctrl-C many times to get out of a
job running in a shell.  Must be something that is timing dependent.

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

* Re: Problems stopping simulations in emacs shells
       [not found]   ` <mailman.2977.1121196281.2857.help-gnu-emacs@gnu.org>
@ 2005-07-12 19:44     ` Pascal Bourguignon
  0 siblings, 0 replies; 5+ messages in thread
From: Pascal Bourguignon @ 2005-07-12 19:44 UTC (permalink / raw)


david@adboyd.com (J. David Boyd) writes:
> And sometimes I've found that I need to hit Ctrl-C many times to get out of a
> job running in a shell.  Must be something that is timing dependent.

Not exactly.

C-c is usually bound to SIGINT in the shells.  That is, when you type
C-c, the terminal driver sends the INT signal to the process
controling the terminal.

The process can handle any and all signals, but KILL, as it wishes.
For most signals, if nothing is done by the process, the default is to
kill the process.  But a program can set a signal handler for the INT
signal and do whatever it please it.  Honest programs try to flush
their buffers and close their files and exit promptly.  However, if
they hang (infinite loop or waiting for I/O or just take more than a
few seconds to be noticed by the user), while doing, the user will be
unhappy and will type C-c C-c C-c, etc sending a useless sequence of
INT signals.  If the process is not waiting in the kernel doing I/O
('D' state in ps), then it can be forcybly terminated immediately with
the KILL signal:  

    kill -KILL $PID

But really, you should be patient and let the process close its file
if you don't want to lose data, unless you know the process is bugged
and not doing what it should.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

This is a signature virus.  Add me to your signature and help me to live

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

* Re: Problems stopping simulations in emacs shells
       [not found] <mailman.2971.1121191732.2857.help-gnu-emacs@gnu.org>
  2005-07-12 18:39 ` Johan Bockgård
@ 2005-07-13 10:51 ` Thien-Thi Nguyen
  1 sibling, 0 replies; 5+ messages in thread
From: Thien-Thi Nguyen @ 2005-07-13 10:51 UTC (permalink / raw)


Benjamin Bobich <benjamin.bobich@philips.com> writes:

> When I run the simulations on a terminal, Ctrl C, pressed twice,
> normally stops the sim.  Any advice on how to fix this problem?

in the *shell* buffer, you need to type C-c twice for every one
time you want the inferior process to see it.  if the inferior
process expects/responds-to two C-c events, you need to type it
four times into emacs.  for three to be seen, six must be given,
and so on.

thi

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

end of thread, other threads:[~2005-07-13 10:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 17:56 Problems stopping simulations in emacs shells Benjamin Bobich
     [not found] <mailman.2971.1121191732.2857.help-gnu-emacs@gnu.org>
2005-07-12 18:39 ` Johan Bockgård
2005-07-12 19:03   ` J. David Boyd
     [not found]   ` <mailman.2977.1121196281.2857.help-gnu-emacs@gnu.org>
2005-07-12 19:44     ` Pascal Bourguignon
2005-07-13 10:51 ` Thien-Thi Nguyen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.