mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Bash not reacting to Ctrl-C
@ 2011-01-28 22:44 julie Sullivan
  2011-01-29 10:37 ` Ingo Molnar
  0 siblings, 1 reply; 9+ messages in thread
From: julie Sullivan @ 2011-01-28 22:44 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel

(apologies for not replying to original thread, I wasn't subscribed)

>Might be some Bash assumption or race that works under other OSs but somehow Linux
>does differently. IIRC Bash is being developed on MacOS-X.

Yep, and I can confirm that this behaviour is the same on MacOS-X too
(I tested Ingo's
bash scripts in my break on a machine at work today).
Ctrl-C is lost about once in every 10 times.

>See that '^C^C' line? That is where i had to do Ctrl-C twice.

I beat Ingo - I got three '^C's in a row on the Mac a couple of times :-)

Cheers
Julie

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCHSET] ptrace,signal: group stop / ptrace updates
@ 2011-01-28 15:08 Tejun Heo
  2011-01-28 16:54 ` Ingo Molnar
  0 siblings, 1 reply; 9+ messages in thread
From: Tejun Heo @ 2011-01-28 15:08 UTC (permalink / raw)
  To: roland, oleg, jan.kratochvil, linux-kernel; +Cc: torvalds, akpm

Hello,

This is another posting of ptrace and group stop interaction update.
The last posting was split over two patchsets[1][2].  Changes are,

* Rebased on top of v2.6.38-rc2

* 0010-ptrace-clean-transitions-between-TASK_STOPPED-and-TR.patch
  updated as per Oleg's comments - the TRACED/TRAPPING race condition
  closed and trapping clearing separated out from group_stop clearing.

0001-signal-fix-SIGCONT-notification-code.patch
0002-ptrace-remove-the-extra-wake_up_process-from-ptrace_.patch
0003-signal-remove-superflous-try_to_freeze-loop-in-do_si.patch
0004-ptrace-kill-tracehook_notify_jctl.patch
0005-ptrace-add-why-to-ptrace_stop.patch
0006-signal-fix-premature-completion-of-group-stop-when-i.patch
0007-signal-use-GROUP_STOP_PENDING-to-stop-once-for-a-sin.patch
0008-ptrace-participate-in-group-stop-from-ptrace_stop-if.patch
0009-ptrace-make-do_signal_stop-use-ptrace_stop-if-the-ta.patch
0010-ptrace-clean-transitions-between-TASK_STOPPED-and-TR.patch

0001-0004 are cleanup/bugfix patches.  0005-0010 improve group stop
handling.

Discussions are still on-going on the following points.

1. Removal of spurious wake_up_process() by 0002 may not be safe[3].

2. STOPPED -> RUNNING -> TRACED transition window may be visible to
   tasks which are not the tracer[4].  Tracee always entering TRACED
   also causes one ptrace test case to fail[5].

3. After immediately re-attaching to a detached task in stopped state,
   WNOHANG wait(2) may fail.

This patchset does change ptrace behavior but the changed aspects are
somewhere between awkward and outright buggy before the changes and
the changes are visible only through very convoluted use cases.
Regardless of future directions from here, I don't think the patches
posted in this patchset would be a problem.

The patchset is available in the following git tree.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git ptrace-review

Thank you.

 fs/exec.c                 |    1 
 include/linux/sched.h     |   11 ++
 include/linux/tracehook.h |   27 -----
 kernel/ptrace.c           |   51 ++++++++--
 kernel/signal.c           |  226 ++++++++++++++++++++++++++++++++++------------
 5 files changed, 225 insertions(+), 91 deletions(-)

--
tejun

[1] http://thread.gmane.org/gmane.linux.kernel/1079975
[2] http://thread.gmane.org/gmane.linux.kernel/1080700
[3] http://thread.gmane.org/gmane.linux.kernel/1079975/focus=1088490
[4] http://thread.gmane.org/gmane.linux.kernel/1080700/focus=1088538
[5] http://thread.gmane.org/gmane.linux.kernel/1080700/focus=1093056

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

end of thread, other threads:[~2011-02-11 14:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 22:44 Bash not reacting to Ctrl-C julie Sullivan
2011-01-29 10:37 ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2011-01-28 15:08 [PATCHSET] ptrace,signal: group stop / ptrace updates Tejun Heo
2011-01-28 16:54 ` Ingo Molnar
2011-01-28 17:55   ` Oleg Nesterov
2011-01-28 18:29     ` Bash not reacting to Ctrl-C Ingo Molnar
2011-02-05 20:34       ` Oleg Nesterov
2011-02-07 13:08         ` Oleg Nesterov
2011-02-09  6:17           ` Michael Witten
2011-02-09 14:53             ` Ingo Molnar
2011-02-09 19:37               ` Michael Witten
2011-02-11 14:41           ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®