Bug 517457 - SIGINT (and others?) not passed to child
SIGINT (and others?) not passed to child
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Roland McGrath
Fedora Extras Quality Assurance
Depends On:
Blocks: 516995
  Show dependency treegraph
Reported: 2009-08-14 03:17 EDT by Ulrich Drepper
Modified: 2009-08-17 05:27 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-08-17 05:27:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ulrich Drepper 2009-08-14 03:17:54 EDT
Description of problem:
When running this little program under strace the child just dies when C-c is pressed.  Without strace the signal is intercepted and handled.  strace should pass signals that can the intercepted on to the child.

#include <setjmp.h>
#include <stdio.h>
#include <signal.h>

static sigjmp_buf b;

static void
h (int s)
  siglongjmp (b, 1);

main (void)
  signal (SIGINT, h);
  if (sigsetjmp (b, 0) == 0)
      puts ("now C-c");
      while (1)
	pause ();
  puts ("SIGINT caught");
  return 0;

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.compile program above
3.press C-c
Actual results:
program just dies, signal handler is not invoked (and shown that this happens)

Expected results:
strace passes signal on to child process

Additional info:
Comment 1 Andreas Schwab 2009-08-17 05:27:05 EDT
Redirect the trace output with -o, which makes strace non-interactive.  An interactive strace will terminate the tracee after receiving SIGINT.

Note You need to log in before you can comment on or make changes to this bug.