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
213e01e6
Commit
213e01e6
authored
Jan 17, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jan 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Make sure to release the fd we grabbed in all cases.
parent
1f7c81eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
fd.c
server/fd.c
+16
-9
No files found.
server/fd.c
View file @
213e01e6
...
@@ -1505,16 +1505,23 @@ int default_fd_signaled( struct object *obj, struct thread *thread )
...
@@ -1505,16 +1505,23 @@ int default_fd_signaled( struct object *obj, struct thread *thread )
int
events
,
ret
;
int
events
,
ret
;
struct
fd
*
fd
=
get_obj_fd
(
obj
);
struct
fd
*
fd
=
get_obj_fd
(
obj
);
if
(
fd
->
inode
)
return
1
;
/* regular files are always signaled */
if
(
fd
->
inode
)
ret
=
1
;
/* regular files are always signaled */
else
events
=
fd
->
fd_ops
->
get_poll_events
(
fd
);
{
ret
=
check_fd_events
(
fd
,
events
)
!=
0
;
events
=
fd
->
fd_ops
->
get_poll_events
(
fd
);
ret
=
check_fd_events
(
fd
,
events
)
!=
0
;
if
(
ret
)
set_fd_events
(
fd
,
0
);
/* stop waiting on select() if we are signaled */
else
if
(
!
list_empty
(
&
obj
->
wait_queue
))
set_fd_events
(
fd
,
events
);
/* restart waiting on poll() if we are no longer signaled */
if
(
ret
)
{
/* stop waiting on select() if we are signaled */
set_fd_events
(
fd
,
0
);
}
else
if
(
!
list_empty
(
&
obj
->
wait_queue
))
{
/* restart waiting on poll() if we are no longer signaled */
set_fd_events
(
fd
,
events
);
}
}
release_object
(
fd
);
release_object
(
fd
);
return
ret
;
return
ret
;
}
}
...
...
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