Commit 1ae869c9 authored by Alexandre Julliard's avatar Alexandre Julliard

Added env ptr to new_process request

parent 78513941
......@@ -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) */
};
......
......@@ -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;
}
......
......@@ -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);
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment