Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ngx_rtmp_exec_run return type to void #1786

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ngx_rtmp_exec_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ typedef struct {
#if !(NGX_WIN32)
static void ngx_rtmp_exec_respawn(ngx_event_t *ev);
static ngx_int_t ngx_rtmp_exec_kill(ngx_rtmp_exec_t *e, ngx_int_t kill_signal);
static ngx_int_t ngx_rtmp_exec_run(ngx_rtmp_exec_t *e);
static void ngx_rtmp_exec_run(ngx_rtmp_exec_t *e);
#endif


Expand Down Expand Up @@ -690,7 +690,7 @@ ngx_rtmp_exec_kill(ngx_rtmp_exec_t *e, ngx_int_t kill_signal)
}


static ngx_int_t
static void
ngx_rtmp_exec_run(ngx_rtmp_exec_t *e)
{
int fd, ret, maxfd, pipefd[2];
Expand All @@ -714,13 +714,13 @@ ngx_rtmp_exec_run(ngx_rtmp_exec_t *e)
if (e->active) {
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, e->log, 0,
"exec: already active '%V'", &ec->cmd);
return NGX_OK;
return;
}

if (pipe(pipefd) == -1) {
ngx_log_error(NGX_LOG_INFO, e->log, ngx_errno,
"exec: pipe failed");
return NGX_ERROR;
return;
}

/* make pipe write end survive through exec */
Expand All @@ -740,7 +740,7 @@ ngx_rtmp_exec_run(ngx_rtmp_exec_t *e)
ngx_log_error(NGX_LOG_INFO, e->log, ngx_errno,
"exec: fcntl failed");

return NGX_ERROR;
return;
}
}

Expand All @@ -763,7 +763,7 @@ ngx_rtmp_exec_run(ngx_rtmp_exec_t *e)
ngx_log_error(NGX_LOG_INFO, e->log, ngx_errno,
"exec: fork failed");

return NGX_ERROR;
return;

case 0:

Expand Down Expand Up @@ -886,7 +886,7 @@ ngx_rtmp_exec_run(ngx_rtmp_exec_t *e)
break;
}

return NGX_OK;
return;
}


Expand Down