Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
b4567078
Commit
b4567078
authored
Nov 18, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DTV: use vlc_open(|at) to work-around O_CLOEXEC
(not cherry-picked from 374fc686a22063c060d36582f0e90ab1a57ab33e)
parent
395d3bfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
modules/access/dtv/linux.c
modules/access/dtv/linux.c
+3
-2
No files found.
modules/access/dtv/linux.c
View file @
b4567078
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#endif
#endif
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_fs.h>
#include <errno.h>
#include <errno.h>
#include <assert.h>
#include <assert.h>
...
@@ -173,7 +174,7 @@ static int dvb_open_adapter (uint8_t adapter)
...
@@ -173,7 +174,7 @@ static int dvb_open_adapter (uint8_t adapter)
char
dir
[
20
];
char
dir
[
20
];
snprintf
(
dir
,
sizeof
(
dir
),
"/dev/dvb/adapter%"
PRIu8
,
adapter
);
snprintf
(
dir
,
sizeof
(
dir
),
"/dev/dvb/adapter%"
PRIu8
,
adapter
);
return
open
(
dir
,
O_SEARCH
|
O_DIRECTORY
|
O_CLOEXEC
);
return
vlc_open
(
dir
,
O_SEARCH
|
O_DIRECTORY
);
}
}
/** Opens the DVB device node of the specified type */
/** Opens the DVB device node of the specified type */
...
@@ -183,7 +184,7 @@ static int dvb_open_node (dvb_device_t *d, const char *type, int flags)
...
@@ -183,7 +184,7 @@ static int dvb_open_node (dvb_device_t *d, const char *type, int flags)
char
path
[
strlen
(
type
)
+
4
];
char
path
[
strlen
(
type
)
+
4
];
snprintf
(
path
,
sizeof
(
path
),
"%s%u"
,
type
,
d
->
device
);
snprintf
(
path
,
sizeof
(
path
),
"%s%u"
,
type
,
d
->
device
);
fd
=
openat
(
d
->
dir
,
path
,
flags
|
O_CLOEXEC
);
fd
=
vlc_openat
(
d
->
dir
,
path
,
flags
);
if
(
fd
!=
-
1
)
if
(
fd
!=
-
1
)
fcntl
(
fd
,
F_SETFL
,
fcntl
(
fd
,
F_GETFL
)
|
O_NONBLOCK
);
fcntl
(
fd
,
F_SETFL
,
fcntl
(
fd
,
F_GETFL
)
|
O_NONBLOCK
);
return
fd
;
return
fd
;
...
...
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