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
7a344c14
Commit
7a344c14
authored
Jun 09, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Avoid a crash when trying to wait on a disconnected pipe client.
parent
d88f9e3c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
fd.c
server/fd.c
+6
-0
file.h
server/file.h
+1
-0
named_pipe.c
server/named_pipe.c
+9
-1
No files found.
server/fd.c
View file @
7a344c14
...
...
@@ -1710,6 +1710,12 @@ void set_fd_signaled( struct fd *fd, int signaled )
if
(
signaled
)
wake_up
(
fd
->
user
,
0
);
}
/* set or clear the fd signaled state */
int
is_fd_signaled
(
struct
fd
*
fd
)
{
return
fd
->
signaled
;
}
/* handler for close_handle that refuses to close fd-associated handles in other processes */
int
fd_close_handle
(
struct
object
*
obj
,
struct
process
*
process
,
obj_handle_t
handle
)
{
...
...
server/file.h
View file @
7a344c14
...
...
@@ -70,6 +70,7 @@ extern void set_fd_events( struct fd *fd, int events );
extern
obj_handle_t
lock_fd
(
struct
fd
*
fd
,
file_pos_t
offset
,
file_pos_t
count
,
int
shared
,
int
wait
);
extern
void
unlock_fd
(
struct
fd
*
fd
,
file_pos_t
offset
,
file_pos_t
count
);
extern
void
set_fd_signaled
(
struct
fd
*
fd
,
int
signaled
);
extern
int
is_fd_signaled
(
struct
fd
*
fd
);
extern
int
default_fd_signaled
(
struct
object
*
obj
,
struct
thread
*
thread
);
extern
unsigned
int
default_fd_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
...
...
server/named_pipe.c
View file @
7a344c14
...
...
@@ -176,6 +176,7 @@ static const struct fd_ops pipe_server_fd_ops =
/* client end functions */
static
void
pipe_client_dump
(
struct
object
*
obj
,
int
verbose
);
static
int
pipe_client_signaled
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
struct
fd
*
pipe_client_get_fd
(
struct
object
*
obj
);
static
void
pipe_client_destroy
(
struct
object
*
obj
);
static
void
pipe_client_flush
(
struct
fd
*
fd
,
struct
event
**
event
);
...
...
@@ -188,7 +189,7 @@ static const struct object_ops pipe_client_ops =
no_get_type
,
/* get_type */
add_queue
,
/* add_queue */
remove_queue
,
/* remove_queue */
default_fd_signaled
,
/* signaled */
pipe_client_signaled
,
/* signaled */
no_satisfied
,
/* satisfied */
no_signal
,
/* signal */
pipe_client_get_fd
,
/* get_fd */
...
...
@@ -289,6 +290,13 @@ static void pipe_client_dump( struct object *obj, int verbose )
fprintf
(
stderr
,
"Named pipe client server=%p
\n
"
,
client
->
server
);
}
static
int
pipe_client_signaled
(
struct
object
*
obj
,
struct
thread
*
thread
)
{
struct
pipe_client
*
client
=
(
struct
pipe_client
*
)
obj
;
return
client
->
fd
&&
is_fd_signaled
(
client
->
fd
);
}
static
void
named_pipe_destroy
(
struct
object
*
obj
)
{
struct
named_pipe
*
pipe
=
(
struct
named_pipe
*
)
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