Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d6683d63
Commit
d6683d63
authored
Sep 24, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Store the process exe file in the process structure.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
31808b08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
17 deletions
+15
-17
process.c
server/process.c
+14
-17
process.h
server/process.h
+1
-0
No files found.
server/process.c
View file @
d6683d63
...
...
@@ -105,7 +105,6 @@ static const struct fd_ops process_fd_ops =
struct
startup_info
{
struct
object
obj
;
/* object header */
struct
file
*
exe_file
;
/* file handle for main exe */
struct
process
*
process
;
/* created process */
data_size_t
info_size
;
/* size of startup info */
data_size_t
data_size
;
/* size of whole startup data */
...
...
@@ -513,6 +512,7 @@ struct process *create_process( int fd, struct thread *parent_thread, int inheri
process
->
startup_state
=
STARTUP_IN_PROGRESS
;
process
->
startup_info
=
NULL
;
process
->
idle_event
=
NULL
;
process
->
exe_file
=
NULL
;
process
->
peb
=
0
;
process
->
ldt_copy
=
0
;
process
->
dir_cache
=
NULL
;
...
...
@@ -617,6 +617,7 @@ static void process_destroy( struct object *obj )
if
(
process
->
msg_fd
)
release_object
(
process
->
msg_fd
);
list_remove
(
&
process
->
entry
);
if
(
process
->
idle_event
)
release_object
(
process
->
idle_event
);
if
(
process
->
exe_file
)
release_object
(
process
->
exe_file
);
if
(
process
->
id
)
free_ptid
(
process
->
id
);
if
(
process
->
token
)
release_object
(
process
->
token
);
free
(
process
->
dir_cache
);
...
...
@@ -665,7 +666,6 @@ static void startup_info_destroy( struct object *obj )
struct
startup_info
*
info
=
(
struct
startup_info
*
)
obj
;
assert
(
obj
->
ops
==
&
startup_info_ops
);
free
(
info
->
data
);
if
(
info
->
exe_file
)
release_object
(
info
->
exe_file
);
if
(
info
->
process
)
release_object
(
info
->
process
);
}
...
...
@@ -823,11 +823,10 @@ static void process_killed( struct process *process )
process
->
desktop
=
0
;
close_process_handles
(
process
);
cancel_process_asyncs
(
process
);
if
(
process
->
idle_event
)
{
release_object
(
process
->
idle_event
);
process
->
idle_event
=
NULL
;
}
if
(
process
->
idle_event
)
release_object
(
process
->
idle_event
);
if
(
process
->
exe_file
)
release_object
(
process
->
exe_file
);
process
->
idle_event
=
NULL
;
process
->
exe_file
=
NULL
;
/* close the console attached to this process, if any */
free_console
(
process
);
...
...
@@ -1129,17 +1128,9 @@ DECL_HANDLER(new_process)
close
(
socket_fd
);
return
;
}
info
->
exe_file
=
NULL
;
info
->
process
=
NULL
;
info
->
data
=
NULL
;
if
(
req
->
exe_file
&&
!
(
info
->
exe_file
=
get_file_obj
(
current
->
process
,
req
->
exe_file
,
FILE_READ_DATA
)))
{
close
(
socket_fd
);
goto
done
;
}
info_ptr
=
get_req_data_after_objattr
(
objattr
,
&
info
->
data_size
);
info
->
info_size
=
min
(
req
->
info_size
,
info
->
data_size
);
...
...
@@ -1185,6 +1176,10 @@ DECL_HANDLER(new_process)
process
->
startup_info
=
(
struct
startup_info
*
)
grab_object
(
info
);
if
(
req
->
exe_file
&&
!
(
process
->
exe_file
=
get_file_obj
(
current
->
process
,
req
->
exe_file
,
FILE_READ_DATA
)))
goto
done
;
if
(
parent
->
job
&&
!
(
req
->
create_flags
&
CREATE_BREAKAWAY_FROM_JOB
)
&&
!
(
parent
->
job
->
limit_flags
&
JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK
))
...
...
@@ -1266,8 +1261,8 @@ DECL_HANDLER(get_startup_info)
if
(
!
info
)
return
;
if
(
info
->
exe_file
&&
!
(
reply
->
exe_file
=
alloc_handle
(
process
,
info
->
exe_file
,
GENERIC_READ
,
0
)))
return
;
if
(
process
->
exe_file
&&
!
(
reply
->
exe_file
=
alloc_handle
(
process
,
process
->
exe_file
,
GENERIC_READ
,
0
)))
return
;
/* we return the data directly without making a copy so this can only be called once */
reply
->
info_size
=
info
->
info_size
;
...
...
@@ -1302,6 +1297,8 @@ DECL_HANDLER(init_process_done)
process
->
ldt_copy
=
req
->
ldt_copy
;
process
->
start_time
=
current_time
;
current
->
entry_point
=
req
->
entry
;
if
(
process
->
exe_file
)
release_object
(
process
->
exe_file
);
process
->
exe_file
=
NULL
;
generate_startup_debug_events
(
process
,
req
->
entry
);
set_process_startup_state
(
process
,
STARTUP_DONE
);
...
...
server/process.h
View file @
d6683d63
...
...
@@ -83,6 +83,7 @@ struct process
enum
startup_state
startup_state
;
/* startup state */
struct
startup_info
*
startup_info
;
/* startup info while init is in progress */
struct
event
*
idle_event
;
/* event for input idle */
struct
file
*
exe_file
;
/* file handle for main exe (during startup only) */
obj_handle_t
winstation
;
/* main handle to process window station */
obj_handle_t
desktop
;
/* handle to desktop to use for new threads */
struct
token
*
token
;
/* security token associated with this process */
...
...
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