代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 3af406243bb2a4a6c8ac5b3f1d98a9cd7e0af295 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Wed, 20 Dec 2023 11:37:13 +0800
Subject: [PATCH] sigaction: fix deprecated signal flags
---
src/lstack/api/lstack_signal.c | 10 +++++++++-
src/lstack/core/lstack_lwip.c | 7 ++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/lstack/api/lstack_signal.c b/src/lstack/api/lstack_signal.c
index 6da6eb4..314c14c 100644
--- a/src/lstack/api/lstack_signal.c
+++ b/src/lstack/api/lstack_signal.c
@@ -57,7 +57,7 @@ static inline bool match_hijack_signal(int sig)
static void lstack_sig_default_handler(int sig)
{
- LSTACK_LOG(ERR, LSTACK, "lstack dumped,caught signal:%d\n", sig);
+ LSTACK_LOG(ERR, LSTACK, "lstack dumped, caught signal: %d\n", sig);
if (get_global_cfg_params() && get_global_cfg_params()->is_primary) {
delete_primary_path();
}
@@ -94,5 +94,13 @@ int lstack_sigaction(int sig_num, const struct sigaction *action, struct sigacti
new_action.sa_handler = lstack_sig_default_handler;
return posix_api->sigaction_fn(sig_num, &new_action, old_action);
}
+
+ /* SA_INTERRUPT is deprecated, use SA_RESETHAND instead. */
+ if ((match_hijack_signal(sig_num) != 0) && (action && action->sa_flags == SA_INTERRUPT)) {
+ new_action = *action;
+ new_action.sa_flags |= SA_RESETHAND;
+ return posix_api->sigaction_fn(sig_num, &new_action, old_action);
+ }
+
return posix_api->sigaction_fn(sig_num, action, old_action);
}
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index 34ec1bd..100f075 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -564,10 +564,11 @@ static ssize_t do_lwip_fill_sendring(struct lwip_sock *sock, const void *buf, si
uint32_t write_avail = gazelle_ring_readable_count(sock->send_ring);
struct wakeup_poll *wakeup = sock->wakeup;
- if (!netconn_is_nonblocking(sock->conn)) {
- while (write_avail < write_num) {
- write_avail = gazelle_ring_readable_count(sock->send_ring);
+ while (!netconn_is_nonblocking(sock->conn) && (write_avail < write_num)) {
+ if (sock->errevent > 0) {
+ GAZELLE_RETURN(ENOTCONN);
}
+ write_avail = gazelle_ring_readable_count(sock->send_ring);
}
/* send_ring is full, data attach last pbuf */
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。