From: sos AT buggy DOT prospect DOT com DOT ru (Sergey Okhapkin) Subject: Strace fix. 15 Feb 1998 11:36:00 -0800 Message-ID: <01BD3A5F.872142D0.cygnus.cygwin32.developers@sos> Reply-To: cygwin32-developers AT cygnus DOT com To: "'cygwin32-developers AT cygnus DOT com'" With last winsup snapshot strace output is missed from a forked process. fork.cc (cygwin_fork_helper): inherit strace_mask on fork. strace.cc (strace_init): make strace_mutex inherittable. f:\cygnus\cdk\winsup>diff -up fork.cc.orig fork.cc --- fork.cc.orig Wed Feb 11 06:14:57 1998 +++ fork.cc Sun Feb 15 21:09:46 1998 @@ -308,6 +308,7 @@ cygwin_fork_helper1 (void *proc_data_sta child->process_state |= PID_SOCKETS_USED; child->process_state |= PID_INITIALIZING | (myself->process_state & PID_USETTY); + child->strace_mask = myself->strace_mask; set_child_mmap_ptr (child); /* Initialize the child's .data and .bss. */ f:\cygnus\cdk\winsup>diff -up strace.cc.orig strace.cc --- strace.cc.orig Thu Feb 12 00:52:13 1998 +++ strace.cc Sun Feb 15 21:21:48 1998 @@ -108,7 +108,7 @@ strace_init (char *buf) SECURITY_ATTRIBUTES sa; sa.nLength = sizeof (sa); sa.lpSecurityDescriptor = 0; - sa.bInheritHandle = 0; + sa.bInheritHandle = TRUE; /* If this fails, that's ok. The debugging output may get mixed up but that's it. */ strace_mutex = CreateMutexA (&sa, FALSE, cygname ("strace", 0)); -- Sergey Okhapkin, http://www.lexa.ru/sos Moscow, Russia Looking for a job