From 99ec9655444730e8dc9ded2cc04821a164c15643 Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Thu, 13 Mar 2003 19:30:19 +0000 Subject: # (child_main): If this is a debugging build output the child process ID and wait for 10 seconds so we have time to connect gdb to the child. This is needed if we want to use gdb against the child process. --- src/child.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/child.c b/src/child.c index 0a27246..9b383cb 100644 --- a/src/child.c +++ b/src/child.c @@ -1,4 +1,4 @@ -/* $Id: child.c,v 1.7 2002-11-21 21:54:09 rjkaes Exp $ +/* $Id: child.c,v 1.8 2003-03-13 19:30:19 rjkaes Exp $ * * Handles the creation/destruction of the various children required for * processing incoming connections. @@ -179,7 +179,12 @@ child_main(struct child_s* ptr) connfd = accept(listenfd, cliaddr, &clilen); - DEBUG2("Process %u has accepted connection", ptr->tid); +#ifndef NDEBUG + /* Pause for 10 seconds to allow us to connect debugger */ + fprintf(stderr, "Process has accepted connection: %u\n", ptr->tid); + sleep(10); + fprintf(stderr, "Continuing process: %u\n", ptr->tid); +#endif /* * Make sure no error occurred... -- cgit v1.2.3