提交 9a9730c2 编写于 作者: X xionglei6

init: fix bugs

Signed-off-by: Nxionglei6 <xionglei6@huawei.com>
上级 187cab1e
......@@ -54,7 +54,7 @@ LE_STATUS LE_CreateSignalTask(const LoopHandle loopHandle, SignalHandle *signalH
LE_CHECK(processSignal != NULL, return LE_FAILURE, "Invalid parameters processSignal");
sigset_t mask;
sigemptyset(&mask);
int sfd = signalfd(-1, &mask, SFD_NONBLOCK);
int sfd = signalfd(-1, &mask, SFD_NONBLOCK | SFD_CLOEXEC);
LE_CHECK(sfd > 0, return -1, "Failed to create signal fd");
LE_BaseInfo info = {TASK_SIGNAL, NULL};
SignalTask *task = (SignalTask *)CreateTask(loopHandle, sfd, &info, sizeof(SignalTask));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册