mirror of
https://github.com/nginx/nginx.git
synced 2026-08-03 22:33:10 +00:00
pass command lines options to workers
This commit is contained in:
parent
bf14b000e6
commit
caf17102e8
3 changed files with 5 additions and 1 deletions
|
|
@ -540,6 +540,8 @@ ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv)
|
|||
ngx_core_conf_t *ccf;
|
||||
ngx_listening_t *ls;
|
||||
|
||||
ngx_memzero(&ctx, sizeof(ngx_exec_ctx_t));
|
||||
|
||||
ctx.path = argv[0];
|
||||
ctx.name = "new binary process";
|
||||
ctx.argv = argv;
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ ngx_spawn_process(ngx_cycle_t *cycle, char *name, ngx_int_t respawn)
|
|||
|
||||
ctx.path = file;
|
||||
ctx.name = name;
|
||||
ctx.args = GetCommandLine();
|
||||
ctx.argv = NULL;
|
||||
ctx.envp = NULL;
|
||||
|
||||
|
|
@ -195,7 +196,7 @@ ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx)
|
|||
|
||||
ngx_memzero(&pi, sizeof(PROCESS_INFORMATION));
|
||||
|
||||
if (CreateProcess(ctx->path, /* STUB */ NULL,
|
||||
if (CreateProcess(ctx->path, ctx->args,
|
||||
NULL, NULL, 0, CREATE_NO_WINDOW, NULL, NULL, &si, &pi)
|
||||
== 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
char *path;
|
||||
char *name;
|
||||
char *args;
|
||||
char *const *argv;
|
||||
char *const *envp;
|
||||
HANDLE child;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue