aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c
diff options
context:
space:
mode:
authorJohannes Weißl <[email protected]>2013-09-05 09:26:55 +0200
committerJohannes Weißl <[email protected]>2013-09-19 09:50:07 +0200
commit935874338ca9946997410a4276bf6c85847e10da (patch)
tree28574ce64f18b89180ca86081a06aad7e95f77de /lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c
parent720721e41c90cc2105326cf0e84accae75a1786a (diff)
downloadotp-935874338ca9946997410a4276bf6c85847e10da.tar.gz
otp-935874338ca9946997410a4276bf6c85847e10da.tar.bz2
otp-935874338ca9946997410a4276bf6c85847e10da.zip
Add test for httpd config option 'script_timeout'
The option got ignored before 720721e.
Diffstat (limited to 'lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c')
-rw-r--r--lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c b/lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c
new file mode 100644
index 0000000000..126bb23987
--- /dev/null
+++ b/lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c
@@ -0,0 +1,26 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+#ifdef __WIN32__
+#include <windows.h>
+#include <fcntl.h>
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+int main(void)
+{
+ unsigned int seconds = 10;
+
+#ifdef __WIN32__
+ Sleep(seconds * 1000);
+ _setmode(_fileno(stdout), _O_BINARY);
+#else
+ sleep(seconds);
+#endif
+
+ printf("Content-type: text/plain\r\n\r\n");
+ printf("Slept for %u seconds.\r\n", seconds);
+ exit(EXIT_SUCCESS);
+}