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
bae3dcc2
Commit
bae3dcc2
authored
Apr 21, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Apr 25, 2016
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Do not hold reference on parent process.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1025ed38
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
10 deletions
+8
-10
process.c
dlls/kernel32/tests/process.c
+1
-1
console.c
server/console.c
+1
-2
process.c
server/process.c
+3
-4
process.h
server/process.h
+1
-1
snapshot.c
server/snapshot.c
+1
-1
thread.c
server/thread.c
+1
-1
No files found.
dlls/kernel32/tests/process.c
View file @
bae3dcc2
...
...
@@ -1157,7 +1157,7 @@ static void test_Toolhelp(void)
Sleep
(
100
);
}
/* The following test fails randomly on some Windows versions, but Gothic 2 depends on it */
todo_wine
ok
(
i
<
20
||
broken
(
i
==
20
),
"process object not released
\n
"
);
ok
(
i
<
20
||
broken
(
i
==
20
),
"process object not released
\n
"
);
snapshot
=
pCreateToolhelp32Snapshot
(
TH32CS_SNAPPROCESS
,
0
);
ok
(
snapshot
!=
INVALID_HANDLE_VALUE
,
"CreateToolhelp32Snapshot failed %u
\n
"
,
GetLastError
());
...
...
server/console.c
View file @
bae3dcc2
...
...
@@ -1424,13 +1424,12 @@ DECL_HANDLER(alloc_console)
case
0
:
/* renderer is current, console to be attached to parent process */
renderer
=
current
;
if
(
!
(
process
=
current
->
process
->
parent
))
if
(
!
(
process
=
get_process_from_id
(
current
->
process
->
parent_id
)
))
{
if
(
fd
!=
-
1
)
close
(
fd
);
set_error
(
STATUS_ACCESS_DENIED
);
return
;
}
grab_object
(
process
);
attach
=
1
;
break
;
case
0xffffffff
:
...
...
server/process.c
View file @
bae3dcc2
...
...
@@ -506,7 +506,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
close
(
fd
);
goto
error
;
}
process
->
parent
=
NULL
;
process
->
parent
_id
=
0
;
process
->
debugger
=
NULL
;
process
->
handles
=
NULL
;
process
->
msg_fd
=
NULL
;
...
...
@@ -558,7 +558,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
else
{
struct
process
*
parent
=
parent_thread
->
process
;
process
->
parent
=
(
struct
process
*
)
grab_object
(
parent
)
;
process
->
parent
_id
=
parent
->
id
;
process
->
handles
=
inherit_all
?
copy_handle_table
(
process
,
parent
)
:
alloc_handle_table
(
process
,
0
);
/* Note: for security reasons, starting a new process does not attempt
...
...
@@ -625,7 +625,6 @@ static void process_destroy( struct object *obj )
release_object
(
process
->
job
);
}
if
(
process
->
console
)
release_object
(
process
->
console
);
if
(
process
->
parent
)
release_object
(
process
->
parent
);
if
(
process
->
msg_fd
)
release_object
(
process
->
msg_fd
);
list_remove
(
&
process
->
entry
);
if
(
process
->
idle_event
)
release_object
(
process
->
idle_event
);
...
...
@@ -1354,7 +1353,7 @@ DECL_HANDLER(get_process_info)
if
((
process
=
get_process_from_handle
(
req
->
handle
,
PROCESS_QUERY_LIMITED_INFORMATION
)))
{
reply
->
pid
=
get_process_id
(
process
);
reply
->
ppid
=
process
->
parent
?
get_process_id
(
process
->
parent
)
:
0
;
reply
->
ppid
=
process
->
parent
_id
;
reply
->
exit_code
=
process
->
exit_code
;
reply
->
priority
=
process
->
priority
;
reply
->
affinity
=
process
->
affinity
;
...
...
server/process.h
View file @
bae3dcc2
...
...
@@ -56,7 +56,7 @@ struct process
{
struct
object
obj
;
/* object header */
struct
list
entry
;
/* entry in system-wide process list */
struct
process
*
parent
;
/* parent process
*/
process_id_t
parent_id
;
/* parent process id (at the time of creation)
*/
struct
list
thread_list
;
/* thread list */
struct
thread
*
debugger
;
/* thread debugging this process */
struct
handle_table
*
handles
;
/* handle entries */
...
...
server/snapshot.c
View file @
bae3dcc2
...
...
@@ -115,7 +115,7 @@ static int snapshot_next_process( struct snapshot *snapshot, struct next_process
ptr
=
&
snapshot
->
processes
[
snapshot
->
process_pos
++
];
reply
->
count
=
ptr
->
count
;
reply
->
pid
=
get_process_id
(
ptr
->
process
);
reply
->
ppid
=
ptr
->
process
->
parent
?
get_process_id
(
ptr
->
process
->
parent
)
:
0
;
reply
->
ppid
=
ptr
->
process
->
parent
_id
;
reply
->
threads
=
ptr
->
threads
;
reply
->
priority
=
ptr
->
priority
;
reply
->
handles
=
ptr
->
handles
;
...
...
server/thread.c
View file @
bae3dcc2
...
...
@@ -1304,7 +1304,7 @@ DECL_HANDLER(init_thread)
process
->
peb
=
req
->
entry
;
process
->
cpu
=
req
->
cpu
;
reply
->
info_size
=
init_process
(
current
);
if
(
!
process
->
parent
)
if
(
!
process
->
parent
_id
)
process
->
affinity
=
current
->
affinity
=
get_thread_affinity
(
current
);
else
set_thread_affinity
(
current
,
current
->
affinity
);
...
...
Vitaly Lipatov
@lav
mentioned in commit
adbba722
·
Sep 03, 2020
mentioned in commit
adbba722
mentioned in commit adbba72246fb7be7ae5c46b200fd7473b6764fd5
Toggle commit list
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