59 lines
2.2 KiB
Diff
59 lines
2.2 KiB
Diff
From 3520955126742b1bc9e49ce2d1ec6e10ac04bd3c Mon Sep 17 00:00:00 2001
|
|
From: zhongtao <zhongtao17@huawei.com>
|
|
Date: Mon, 8 May 2023 10:37:53 +0800
|
|
Subject: [PATCH 60/79] fix security warning
|
|
|
|
Signed-off-by: zhongtao <zhongtao17@huawei.com>
|
|
---
|
|
src/cmd/isulad-shim/process.c | 6 +++---
|
|
src/cmd/isulad-shim/process.h | 2 +-
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/cmd/isulad-shim/process.c b/src/cmd/isulad-shim/process.c
|
|
index c31f8af6..f1391ecb 100644
|
|
--- a/src/cmd/isulad-shim/process.c
|
|
+++ b/src/cmd/isulad-shim/process.c
|
|
@@ -1164,7 +1164,7 @@ static int try_wait_all_child(void)
|
|
return 1;
|
|
}
|
|
|
|
-static int waitpid_with_timeout(int ctr_pid, int *status, const int64_t timeout)
|
|
+static int waitpid_with_timeout(int ctr_pid, int *status, const uint64_t timeout)
|
|
{
|
|
int nret = 0;
|
|
time_t start_time = time(NULL);
|
|
@@ -1210,7 +1210,7 @@ static int waitpid_with_timeout(int ctr_pid, int *status, const int64_t timeout
|
|
* If timeout <= 0, blocking wait in reap_container.
|
|
* If timeout > 0, non-blocking wait pid with timeout.
|
|
*/
|
|
-static int wait_container_process_with_timeout(process_t *p, const unsigned int timeout, int *status)
|
|
+static int wait_container_process_with_timeout(process_t *p, const uint64_t timeout, int *status)
|
|
{
|
|
int ret = SHIM_ERR;
|
|
|
|
@@ -1248,7 +1248,7 @@ static int wait_container_process_with_timeout(process_t *p, const unsigned int
|
|
|
|
}
|
|
|
|
-int process_signal_handle_routine(process_t *p, const pthread_t tid_epoll, const unsigned int timeout)
|
|
+int process_signal_handle_routine(process_t *p, const pthread_t tid_epoll, const uint64_t timeout)
|
|
{
|
|
int nret = 0;
|
|
int ret = 0;
|
|
diff --git a/src/cmd/isulad-shim/process.h b/src/cmd/isulad-shim/process.h
|
|
index 4cb6462c..93e01e7b 100644
|
|
--- a/src/cmd/isulad-shim/process.h
|
|
+++ b/src/cmd/isulad-shim/process.h
|
|
@@ -70,7 +70,7 @@ process_t* new_process(char *id, char *bundle, char *runtime);
|
|
|
|
int process_io_start(process_t *p, pthread_t *tid_epoll);
|
|
int create_process(process_t *p);
|
|
-int process_signal_handle_routine(process_t *p, const pthread_t tid_epoll, const unsigned int timeout);
|
|
+int process_signal_handle_routine(process_t *p, const pthread_t tid_epoll, const uint64_t timeout);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
--
|
|
2.25.1
|
|
|