Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
3f2488d6
Commit
3f2488d6
authored
Aug 24, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
file: set the non-blocking flag on pipes and sockets passed as fd://
(cherry picked from commit
ed68c13d
)
parent
58faf523
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
modules/access/file.c
modules/access/file.c
+9
-4
No files found.
modules/access/file.c
View file @
3f2488d6
...
...
@@ -193,10 +193,15 @@ int FileOpen( vlc_object_t *p_this )
goto
error
;
}
#ifdef S_ISSOCK
if
(
!
S_ISFIFO
(
st
.
st_mode
)
&&
!
S_ISSOCK
(
st
.
st_mode
))
/* Clear non-blocking mode when not useful or not specified */
fcntl
(
fd
,
F_SETFL
,
fcntl
(
fd
,
F_GETFL
)
&
~
O_NONBLOCK
);
#if O_NONBLOCK
int
flags
=
fcntl
(
fd
,
F_GETFL
);
if
(
S_ISFIFO
(
st
.
st_mode
)
||
S_ISSOCK
(
st
.
st_mode
))
/* Force non-blocking mode where applicable (fd://) */
flags
|=
O_NONBLOCK
;
else
/* Force blocking mode when not useful or not specified */
flags
&=
~
O_NONBLOCK
;
fcntl
(
fd
,
F_SETFL
,
flags
);
#endif
/* Directories can be opened and read from, but only readdir() knows
...
...
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