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
453458f2
Commit
453458f2
authored
Jul 17, 2015
by
Andrew Cook
Committed by
Alexandre Julliard
Jul 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Implement JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE.
parent
7d3f13a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
process.c
dlls/kernel32/tests/process.c
+0
-1
process.c
server/process.c
+15
-1
No files found.
dlls/kernel32/tests/process.c
View file @
453458f2
...
...
@@ -2452,7 +2452,6 @@ static void test_KillOnJobClose(void)
CloseHandle
(
job
);
dwret
=
WaitForSingleObject
(
pi
.
hProcess
,
1000
);
todo_wine
ok
(
dwret
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %u
\n
"
,
dwret
);
if
(
dwret
==
WAIT_TIMEOUT
)
TerminateProcess
(
pi
.
hProcess
,
0
);
...
...
server/process.c
View file @
453458f2
...
...
@@ -140,6 +140,7 @@ static void job_dump( struct object *obj, int verbose );
static
struct
object_type
*
job_get_type
(
struct
object
*
obj
);
static
int
job_signaled
(
struct
object
*
obj
,
struct
wait_queue_entry
*
entry
);
static
unsigned
int
job_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
static
int
job_close_handle
(
struct
object
*
obj
,
struct
process
*
process
,
obj_handle_t
handle
);
static
void
job_destroy
(
struct
object
*
obj
);
struct
job
...
...
@@ -170,7 +171,7 @@ static const struct object_ops job_ops =
default_set_sd
,
/* set_sd */
no_lookup_name
,
/* lookup_name */
no_open_file
,
/* open_file */
no_close_handle
,
/* close_handle */
job_close_handle
,
/* close_handle */
job_destroy
/* destroy */
};
...
...
@@ -287,6 +288,19 @@ static void terminate_job( struct job *job, int exit_code )
wake_up
(
&
job
->
obj
,
0
);
}
static
int
job_close_handle
(
struct
object
*
obj
,
struct
process
*
process
,
obj_handle_t
handle
)
{
struct
job
*
job
=
(
struct
job
*
)
obj
;
assert
(
obj
->
ops
==
&
job_ops
);
if
(
obj
->
handle_count
==
1
)
/* last handle */
{
if
(
job
->
limit_flags
&
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
)
terminate_job
(
job
,
0
);
}
return
1
;
}
static
void
job_destroy
(
struct
object
*
obj
)
{
struct
job
*
job
=
(
struct
job
*
)
obj
;
...
...
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