From 1ae869c9a304a64f21ed3a636db48c7efef24358 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 18 Apr 1999 14:41:41 +0000 Subject: [PATCH] Added env ptr to new_process request --- include/server.h | 2 ++ server/process.c | 2 ++ server/trace.c | 4 +++- tools/make_requests | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/server.h b/include/server.h index fe14a9b778e..4581dbce5bd 100644 --- a/include/server.h +++ b/include/server.h @@ -49,6 +49,7 @@ struct new_process_request int hstdin; /* handle for stdin */ int hstdout; /* handle for stdout */ int hstderr; /* handle for stderr */ + void* env_ptr; /* pointer to environment (FIXME: hack) */ char cmd_line[0]; /* command line */ }; struct new_process_reply @@ -90,6 +91,7 @@ struct init_process_reply int hstdin; /* handle for stdin */ int hstdout; /* handle for stdout */ int hstderr; /* handle for stderr */ + void* env_ptr; /* pointer to environment (FIXME: hack) */ }; diff --git a/server/process.c b/server/process.c index 4ef7229b57e..61273f0e319 100644 --- a/server/process.c +++ b/server/process.c @@ -125,6 +125,7 @@ struct process *create_initial_process(void) GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, 1 ); info->hstderr = alloc_handle( &initial_process, initial_process.console_out, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, 1 ); + info->env_ptr = NULL; initial_process.info = info; grab_object( &initial_process ); /* so that we never free it */ return &initial_process; @@ -232,6 +233,7 @@ int get_process_init_info( struct process *process, struct init_process_reply *r reply->hstdin = info->hstdin; reply->hstdout = info->hstdout; reply->hstderr = info->hstderr; + reply->env_ptr = info->env_ptr; free( info ); return 1; } diff --git a/server/trace.c b/server/trace.c index 260b16b22c9..a51f954a679 100644 --- a/server/trace.c +++ b/server/trace.c @@ -14,6 +14,7 @@ static int dump_new_process_request( struct new_process_request *req, int len ) fprintf( stderr, " hstdin=%d,", req->hstdin ); fprintf( stderr, " hstdout=%d,", req->hstdout ); fprintf( stderr, " hstderr=%d,", req->hstderr ); + fprintf( stderr, " env_ptr=%p,", req->env_ptr ); fprintf( stderr, " cmd_line=\"%.*s\"", len - (int)sizeof(*req), (char *)(req+1) ); return len; } @@ -57,7 +58,8 @@ static int dump_init_process_reply( struct init_process_reply *req, int len ) fprintf( stderr, " start_flags=%d,", req->start_flags ); fprintf( stderr, " hstdin=%d,", req->hstdin ); fprintf( stderr, " hstdout=%d,", req->hstdout ); - fprintf( stderr, " hstderr=%d", req->hstderr ); + fprintf( stderr, " hstderr=%d,", req->hstderr ); + fprintf( stderr, " env_ptr=%p", req->env_ptr ); return (int)sizeof(*req); } diff --git a/tools/make_requests b/tools/make_requests index d404fa19411..b587a912bb9 100755 --- a/tools/make_requests +++ b/tools/make_requests @@ -220,8 +220,8 @@ sub DO_REPLY next if /^{$/; s!/\*.*\*/!!g; next if /^\s*$/; - / *(\w+\**( +\w+\**)*) +(\w+);/ or die "Unrecognized syntax $_"; - my $type = $1; + / *(\w+\**( +\w+\**)*) +(\w+)(\[0\])?;/ or die "Unrecognized syntax $_"; + my $type = $1 . ($4 || ""); my $var = $3; die "Unrecognized type $type" unless defined($formats{$type}); push @struct, $type, $var;