summaryrefslogtreecommitdiffstats
path: root/apps/lib
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-05-17 13:24:20 +0200
committerDr. David von Oheimb <dev@ddvo.net>2021-05-18 14:49:33 +0200
commit9be5f9a8698b0d902ef1281716eda73a4d8478ed (patch)
tree9a6fae021f6d21482b78768b97105da1495e613a /apps/lib
parent78c44e4f819721eb80ad95fddc360a34f9e93118 (diff)
Move ossl_sleep() to e_os.h and use it in apps
Fixes #15304 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15308)
Diffstat (limited to 'apps/lib')
-rw-r--r--apps/lib/http_server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/lib/http_server.c b/apps/lib/http_server.c
index e7e84fa4c5..b39f218507 100644
--- a/apps/lib/http_server.c
+++ b/apps/lib/http_server.c
@@ -96,7 +96,7 @@ static void killall(int ret, pid_t *kidpids)
if (kidpids[i] != 0)
(void)kill(kidpids[i], SIGTERM);
OPENSSL_free(kidpids);
- sleep(1);
+ ossl_sleep(1000);
exit(ret);
}
@@ -166,7 +166,7 @@ void spawn_loop(const char *prog)
WCOREDUMP(status) ? " (core dumped)" :
# endif
"");
- sleep(1);
+ ossl_sleep(1000);
}
break;
} else if (errno != EINTR) {
@@ -180,7 +180,7 @@ void spawn_loop(const char *prog)
switch (fpid = fork()) {
case -1: /* error */
/* System critically low on memory, pause and try again later */
- sleep(30);
+ ossl_sleep(30000);
break;
case 0: /* child */
OPENSSL_free(kidpids);