Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
449d10fd
Commit
449d10fd
authored
Aug 19, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
Aug 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed regression in process creation (std handle inheritance).
parent
9b8a0595
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
14 deletions
+25
-14
server_protocol.h
include/wine/server_protocol.h
+1
-2
process.c
scheduler/process.c
+4
-1
console.c
server/console.c
+4
-2
process.c
server/process.c
+16
-7
protocol.def
server/protocol.def
+0
-1
trace.c
server/trace.c
+0
-1
No files found.
include/wine/server_protocol.h
View file @
449d10fd
...
...
@@ -190,7 +190,6 @@ struct new_process_request
{
struct
request_header
__header
;
int
inherit_all
;
int
use_handles
;
int
create_flags
;
int
unix_pid
;
obj_handle_t
exe_file
;
...
...
@@ -3647,6 +3646,6 @@ union generic_reply
struct
open_token_reply
open_token_reply
;
};
#define SERVER_PROTOCOL_VERSION 11
8
#define SERVER_PROTOCOL_VERSION 11
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
scheduler/process.c
View file @
449d10fd
...
...
@@ -341,6 +341,10 @@ static BOOL process_init( char *argv[] )
}
else
{
/* convert value from server:
* + 0 => INVALID_HANDLE_VALUE
* + console handle need to be mapped
*/
if
(
!
process_pmts
.
hStdInput
)
process_pmts
.
hStdInput
=
INVALID_HANDLE_VALUE
;
else
if
(
VerifyConsoleIoHandle
(
console_handle_map
(
process_pmts
.
hStdInput
)))
...
...
@@ -944,7 +948,6 @@ static BOOL create_process( HANDLE hFile, LPCSTR filename, LPSTR cmd_line, LPCST
req
->
inherit_all
=
inherit
;
req
->
create_flags
=
flags
;
req
->
use_handles
=
(
startup
->
dwFlags
&
STARTF_USESTDHANDLES
)
!=
0
;
req
->
unix_pid
=
pid
;
req
->
exe_file
=
hFile
;
if
(
startup
->
dwFlags
&
STARTF_USESTDHANDLES
)
...
...
server/console.c
View file @
449d10fd
...
...
@@ -347,9 +347,11 @@ void inherit_console(struct thread *parent_thread, struct process *process, obj_
{
struct
console_input
*
console
;
if
((
console
=
(
struct
console_input
*
)
get_handle_obj
(
parent
,
hconin
,
0
,
NULL
)))
/* FIXME: should we check some access rights ? */
if
((
console
=
(
struct
console_input
*
)
get_handle_obj
(
parent
,
hconin
,
0
,
&
console_input_ops
)))
{
if
(
console
->
renderer
==
parent_thread
)
if
(
console
->
renderer
==
parent_thread
)
{
process
->
console
=
(
struct
console_input
*
)
grab_object
(
console
);
process
->
console
->
num_proc
++
;
...
...
server/process.c
View file @
449d10fd
...
...
@@ -83,7 +83,6 @@ struct startup_info
struct
object
obj
;
/* object header */
struct
list
entry
;
/* entry in list of startup infos */
int
inherit_all
;
/* inherit all handles from parent */
int
use_handles
;
/* use stdio handles */
int
create_flags
;
/* creation flags */
int
unix_pid
;
/* Unix pid of new process */
obj_handle_t
hstdin
;
/* handle for stdin */
...
...
@@ -216,14 +215,25 @@ static int set_process_console( struct process *process, struct thread *parent_t
* like if hConOut and hConIn are console handles, then they should be on the same
* physical console
*/
inherit_console
(
parent_thread
,
process
,
(
info
->
inherit_all
||
info
->
use_handles
)
?
info
->
hstdin
:
0
);
inherit_console
(
parent_thread
,
process
,
info
->
inherit_all
?
info
->
hstdin
:
0
);
}
if
(
info
)
{
reply
->
hstdin
=
info
->
hstdin
;
reply
->
hstdout
=
info
->
hstdout
;
reply
->
hstderr
=
info
->
hstderr
;
if
(
!
info
->
inherit_all
)
{
reply
->
hstdin
=
duplicate_handle
(
parent_thread
->
process
,
info
->
hstdin
,
process
,
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
);
reply
->
hstdout
=
duplicate_handle
(
parent_thread
->
process
,
info
->
hstdout
,
process
,
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
);
reply
->
hstderr
=
duplicate_handle
(
parent_thread
->
process
,
info
->
hstderr
,
process
,
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
);
}
else
{
reply
->
hstdin
=
info
->
hstdin
;
reply
->
hstdout
=
info
->
hstdout
;
reply
->
hstderr
=
info
->
hstderr
;
}
}
else
reply
->
hstdin
=
reply
->
hstdout
=
reply
->
hstderr
=
0
;
/* some handles above may have been invalid; this is not an error */
...
...
@@ -870,7 +880,6 @@ DECL_HANDLER(new_process)
if
(
!
(
info
=
alloc_object
(
&
startup_info_ops
)))
return
;
list_add_head
(
&
startup_info_list
,
&
info
->
entry
);
info
->
inherit_all
=
req
->
inherit_all
;
info
->
use_handles
=
req
->
use_handles
;
info
->
create_flags
=
req
->
create_flags
;
info
->
unix_pid
=
req
->
unix_pid
;
info
->
hstdin
=
req
->
hstdin
;
...
...
server/protocol.def
View file @
449d10fd
...
...
@@ -204,7 +204,6 @@ typedef struct
/* Create a new process from the context of the parent */
@REQ(new_process)
int inherit_all; /* inherit all handles from parent */
int use_handles; /* use stdio handles */
int create_flags; /* creation flags */
int unix_pid; /* Unix pid of new process */
obj_handle_t exe_file; /* file handle for main exe */
...
...
server/trace.c
View file @
449d10fd
...
...
@@ -371,7 +371,6 @@ typedef void (*dump_func)( const void *req );
static
void
dump_new_process_request
(
const
struct
new_process_request
*
req
)
{
fprintf
(
stderr
,
" inherit_all=%d,"
,
req
->
inherit_all
);
fprintf
(
stderr
,
" use_handles=%d,"
,
req
->
use_handles
);
fprintf
(
stderr
,
" create_flags=%d,"
,
req
->
create_flags
);
fprintf
(
stderr
,
" unix_pid=%d,"
,
req
->
unix_pid
);
fprintf
(
stderr
,
" exe_file=%p,"
,
req
->
exe_file
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment