Changeset 409 for trunk/include


Ignore:
Timestamp:
Aug 27, 2012, 9:08:06 PM (12 years ago)
Author:
katerina
Message:

Improved fix for ticket #311 (thread safety of --enable-ptrace).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/sh_unix.h

    r408 r409  
    375375#endif
    376376void sh_set_save_tv();
     377void sh_set_untraced(int val);
     378int  sh_get_untraced();
    377379#endif
    378380
     
    394396int sh_derr(void)
    395397{
    396   sh_not_traced = 0;
     398  sh_set_untraced(0);
    397399
    398400#ifdef HAVE_GETTIMEOFDAY
     
    404406  raise(SIGTRAP);
    405407 
    406   if (sh_not_traced == 0)
     408  if (sh_get_untraced() == 0)
    407409    _exit(5);
    408410
    409   sh_not_traced = 0;
     411  sh_set_untraced(0);
    410412  return (0);
    411413}
Note: See TracChangeset for help on using the changeset viewer.