diff options
Diffstat (limited to 'src/testcurl/test_concurrent_stop.c')
-rw-r--r-- | src/testcurl/test_concurrent_stop.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c index 17b4198c..88839ffd 100644 --- a/src/testcurl/test_concurrent_stop.c +++ b/src/testcurl/test_concurrent_stop.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libmicrohttpd | 2 | This file is part of libmicrohttpd |
3 | Copyright (C) 2007, 2009, 2011, 2015 Christian Grothoff | 3 | Copyright (C) 2007, 2009, 2011, 2015, 2016 Christian Grothoff |
4 | 4 | ||
5 | libmicrohttpd is free software; you can redistribute it and/or modify | 5 | libmicrohttpd is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -149,8 +149,12 @@ do_gets (int port) | |||
149 | _exit (0); | 149 | _exit (0); |
150 | } | 150 | } |
151 | } | 151 | } |
152 | sleep (1); | ||
152 | for (j=0;j<PAR;j++) | 153 | for (j=0;j<PAR;j++) |
154 | { | ||
155 | kill (par[j], SIGKILL); | ||
153 | waitpid (par[j], NULL, 0); | 156 | waitpid (par[j], NULL, 0); |
157 | } | ||
154 | _exit (0); | 158 | _exit (0); |
155 | } | 159 | } |
156 | 160 | ||
@@ -175,7 +179,10 @@ testMultithreadedGet (int port, | |||
175 | pid_t p; | 179 | pid_t p; |
176 | 180 | ||
177 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | poll_flag, | 181 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | poll_flag, |
178 | port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 182 | port, |
183 | NULL, NULL, | ||
184 | &ahc_echo, "GET", | ||
185 | MHD_OPTION_END); | ||
179 | if (d == NULL) | 186 | if (d == NULL) |
180 | return 16; | 187 | return 16; |
181 | p = do_gets (port); | 188 | p = do_gets (port); |