mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity 160162 check fcntl return
Signed-off-by: Andy Green <andy@warmcat.com>
This commit is contained in:
parent
16146cdad8
commit
a2757c74b1
1 changed files with 4 additions and 1 deletions
|
@ -1767,7 +1767,10 @@ lws_cgi(struct lws *wsi, const char * const *exec_array, int script_uri_path_len
|
|||
|
||||
/* read side is 0, stdin we want the write side, others read */
|
||||
cgi->stdwsi[n]->sock = cgi->pipe_fds[n][!!(n == 0)];
|
||||
fcntl(cgi->pipe_fds[n][!!(n == 0)], F_SETFL, O_NONBLOCK);
|
||||
if (fcntl(cgi->pipe_fds[n][!!(n == 0)], F_SETFL, O_NONBLOCK) < 0) {
|
||||
lwsl_err("%s: setting NONBLOCK failed\n", __func__);
|
||||
goto bail2;
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < 3; n++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue