summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2003-03-13 19:30:19 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2003-03-13 19:30:19 +0000
commit99ec9655444730e8dc9ded2cc04821a164c15643 (patch)
tree60c008658e47fb0b7d37373bd56c6111bb95135e
parent0a3a1d7c711ed1da5cc939cbea3fc2dd7cb7668a (diff)
downloadtinyproxy-99ec9655444730e8dc9ded2cc04821a164c15643.tar.gz
tinyproxy-99ec9655444730e8dc9ded2cc04821a164c15643.zip
# (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.
Diffstat (limited to '')
-rw-r--r--src/child.c9
1 files changed, 7 insertions, 2 deletions
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...