diff -x CVS -urpN 2009-01-21/ChangeLog 2009-01-22/ChangeLog --- 2009-01-21/ChangeLog 2009-01-17 02:52:54.000000000 +0100 +++ 2009-01-22/ChangeLog 2009-01-21 20:05:43.000000000 +0100 @@ -1,3 +1,9 @@ +2009-01-21 Denys Vlasenko <[email protected]> + + * strace.c (collect_stopped_tcbs): Do not return NULL when ECHILD + is detected, return collected list instead. Fixes symptom when + the last "+++ killed by SIGxxx +++" is not printed. + 2009-01-17 Denys Vlasenko <[email protected]> Two cleanups: tcb table expansion failure is not really a survivable diff -x CVS -urpN 2009-01-21/strace.c 2009-01-22/strace.c --- 2009-01-21/strace.c 2009-01-17 02:52:54.000000000 +0100 +++ 2009-01-22/strace.c 2009-01-21 20:05:43.000000000 +0100 @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: strace.c,v 1.102 2009/01/17 01:52:54 vda_linux Exp $ + * $Id: strace.c,v 1.103 2009/01/21 19:05:43 vda_linux Exp $ */ #include "defs.h" @@ -2309,10 +2309,9 @@ collect_stopped_tcbs(void) break; } if (pid == -1) { - switch (wait_errno) { - case EINTR: + if (wait_errno == EINTR) continue; - case ECHILD: + if (wait_errno == ECHILD) { /* * We would like to verify this case * but sometimes a race in Solbourne's @@ -2320,17 +2319,16 @@ collect_stopped_tcbs(void) * ECHILD before sending us SIGCHILD. */ #if 0 - if (nprocs == 0) - return NULL; - fprintf(stderr, "strace: proc miscount\n"); - exit(1); + if (nprocs != 0) { + fprintf(stderr, "strace: proc miscount\n"); + exit(1); + } #endif - return NULL; - default: - errno = wait_errno; - perror("strace: wait"); - exit(1); + break; } + errno = wait_errno; + perror("strace: wait"); + exit(1); } if (pid == popen_pid) { if (WIFEXITED(status) || WIFSIGNALED(status))
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
