Bug 517457 - SIGINT (and others?) not passed to child
Summary: SIGINT (and others?) not passed to child
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: strace
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 516995
TreeView+ depends on / blocked
 
Reported: 2009-08-14 07:17 UTC by Ulrich Drepper
Modified: 2009-08-17 09:27 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-08-17 09:27:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ulrich Drepper 2009-08-14 07:17:54 UTC
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);
}

int
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):
strace-4.5.18-2.fc11.x86_64

How reproducible:
always

Steps to Reproduce:
1.compile program above
2.start
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 09:27:05 UTC
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.