aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vcl/sock_test_client.c9
-rw-r--r--src/vcl/sock_test_server.c9
-rw-r--r--src/vcl/vppcom.c6
3 files changed, 21 insertions, 3 deletions
diff --git a/src/vcl/sock_test_client.c b/src/vcl/sock_test_client.c
index bf467981815..78987974ee6 100644
--- a/src/vcl/sock_test_client.c
+++ b/src/vcl/sock_test_client.c
@@ -648,7 +648,14 @@ sock_test_connect_test_sockets (uint32_t num_test_sockets)
errno_val);
return tsock->fd;
}
- fcntl (tsock->fd, F_SETFL, O_NONBLOCK);
+ if (fcntl (tsock->fd, F_SETFL, O_NONBLOCK) < 0)
+ {
+ errno_val = errno;
+ perror ("ERROR in sock_test_connect_test_sockets()");
+ fprintf (stderr, "CLIENT: ERROR: fcntl failed (errno = %d)!\n",
+ errno_val);
+ return -1;
+ }
#ifdef VCL_TEST
rv = vppcom_session_connect (tsock->fd, &scm->server_endpt);
diff --git a/src/vcl/sock_test_server.c b/src/vcl/sock_test_server.c
index fbfe66684cb..354b9900d10 100644
--- a/src/vcl/sock_test_server.c
+++ b/src/vcl/sock_test_server.c
@@ -653,7 +653,14 @@ main (int argc, char **argv)
errno_val);
return rv;
}
- fcntl (ssm->listen_fd, F_SETFL, O_NONBLOCK);
+ if (fcntl (ssm->listen_fd, F_SETFL, O_NONBLOCK) < 0)
+ {
+ errno_val = errno;
+ perror ("ERROR in main()");
+ fprintf (stderr, "SERVER: ERROR: fcntl failed (errno = %d)!\n",
+ errno_val);
+ return rv;
+ }
#ifdef VCL_TEST
rv = vppcom_session_listen (ssm->listen_fd, 10);
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index a456ed0e4cd..be3081edcf5 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -795,7 +795,11 @@ vcl_intercept_sigchld_handler (int signum, siginfo_t * si, void *uc)
if (vcl_get_worker_index () == ~0)
return;
- sigaction (SIGCHLD, &old_sa, 0);
+ if (sigaction (SIGCHLD, &old_sa, 0))
+ {
+ VERR ("couldn't restore sigchld");
+ exit (-1);
+ }
wrk = vcl_worker_get_current ();
if (wrk->forked_child == ~0)