aboutsummaryrefslogtreecommitdiff
path: root/tests/server
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-02-17 04:36:08 +0000
committerYang Tse <yangsita@gmail.com>2008-02-17 04:36:08 +0000
commit23547fa2a0687927d684fa8328f2863853c26d06 (patch)
tree4a38ea185558bc26334251a4b0a4dcb0a21674d8 /tests/server
parent550d6f74b9223231d939ef8526090a3f387b0609 (diff)
sockfilt will quit when orphaned
Diffstat (limited to 'tests/server')
-rw-r--r--tests/server/sockfilt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 9962a4c40..7c3404c1f 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -181,6 +181,13 @@ static int juggle(curl_socket_t *sockfdp,
unsigned char buffer[17010];
char data[16];
+#ifdef HAVE_GETPPID
+ /* As a last resort, quit if sockfilt process becomes orphan. Just in case
+ parent ftpserver process has died without killing its sockfilt children */
+ if(getppid() <= 1)
+ return FALSE;
+#endif
+
timeout.tv_sec = 120;
timeout.tv_usec = 0;