mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-29 09:22:23 +00:00
Correctly handle EINTR while doing I/O..
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
11
nDPId-test.c
11
nDPId-test.c
@@ -360,6 +360,10 @@ static void * nDPIsrvd_mainloop_thread(void * const arg)
|
||||
logger(1, "%s", "nDPIsrvd epoll wait failed.");
|
||||
THREAD_ERROR_GOTO(arg);
|
||||
}
|
||||
else if (errno == EINTR)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for (int i = 0; i < nready; i++)
|
||||
{
|
||||
@@ -374,7 +378,8 @@ static void * nDPIsrvd_mainloop_thread(void * const arg)
|
||||
if (remote == mock_json_desc)
|
||||
{
|
||||
remote_desc_name = "Mock JSON";
|
||||
do {
|
||||
do
|
||||
{
|
||||
if (mock_test_desc->fd >= 0)
|
||||
drain_write_buffers_blocking(mock_test_desc);
|
||||
if (mock_buff_desc->fd >= 0)
|
||||
@@ -906,6 +911,10 @@ static void * distributor_client_mainloop_thread(void * const arg)
|
||||
logger(1, "%s", "Distributor epoll wait failed.");
|
||||
THREAD_ERROR_GOTO(trv);
|
||||
}
|
||||
else if (nready < 0 && errno == EINTR)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for (int i = 0; i < nready; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user