Menu

#11 Fix for a SIGTRAP signal handling

open
nobody
None
5
2004-07-05
2004-07-05
No

When a simple program as following runs over strace and
receives a SIGTRAP signal then strace gets confused.

void main()
{
while(1) sleep(2);
}

The following patch is recommended to fix handling of a
SIGTRAP signal in strace.

Discussion

  • Maxim Shchetynin

     
  • Dmitry V. Levin

    Dmitry V. Levin - 2004-12-19

    Logged In: YES
    user_id=26437

    Nice, but your fix breaks strace on 2.4 kernels.
    Could you submit corrected fix, please?

     
  • Nobody/Anonymous

    Logged In: NO

    Please add this. The 2.4.xx kernels are dead and buried.

    Currently strace kills a process which takes a SIGSEGV
    or similar, even if the signal handler would fix the
    problem. (by updating EIP in the signal context, changing
    permissions on a page, self-modifying the code, or just
    never returning from the signal handler)