server: Only avoid running low-level hooks in processes currently suspended by a debugger.

This commit is contained in:
Alexandre Julliard 2011-06-17 11:54:29 +02:00
parent d31d2074ab
commit 457a847849
1 changed files with 2 additions and 2 deletions

View File

@ -207,8 +207,8 @@ static inline int run_hook_in_current_thread( struct hook *hook )
if ((hook->flags & WINEVENT_SKIPOWNPROCESS) && hook->process == current->process) return 0;
if (hook->thread && hook->thread != current) return 0;
if ((hook->flags & WINEVENT_SKIPOWNTHREAD) && hook->thread == current) return 0;
/* don't run low-level hooks in debugged processes */
if (run_hook_in_owner_thread( hook ) && hook->owner->process->debugger) return 0;
/* don't run low-level hooks in processes suspended for debugging */
if (run_hook_in_owner_thread( hook ) && hook->owner->process->suspend) return 0;
return 1;
}