Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
795baed3
Commit
795baed3
authored
Aug 20, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system/FileDescriptor: make pipe2() mandatory on Linux
parent
5487d40b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
configure.ac
configure.ac
+1
-1
FileDescriptor.cxx
src/system/FileDescriptor.cxx
+3
-3
No files found.
configure.ac
View file @
795baed3
...
...
@@ -241,7 +241,7 @@ AC_SEARCH_LIBS([socket], [network socket])
AC_SEARCH_LIBS([gethostbyname], [nsl])
if test x$host_is_linux = xyes; then
AC_CHECK_FUNCS(
pipe2
accept4 linkat)
AC_CHECK_FUNCS(accept4 linkat)
fi
AC_CHECK_FUNCS(getpwnam_r getpwuid_r)
...
...
src/system/FileDescriptor.cxx
View file @
795baed3
...
...
@@ -120,7 +120,7 @@ FileDescriptor::CreatePipe(FileDescriptor &r, FileDescriptor &w) noexcept
{
int
fds
[
2
];
#ifdef
HAVE_PIPE2
#ifdef
__linux__
const
int
flags
=
O_CLOEXEC
;
const
int
result
=
pipe2
(
fds
,
flags
);
#elif defined(_WIN32)
...
...
@@ -145,7 +145,7 @@ FileDescriptor::CreatePipeNonBlock(FileDescriptor &r,
{
int
fds
[
2
];
#ifdef
HAVE_PIPE2
#ifdef
__linux__
const
int
flags
=
O_CLOEXEC
|
O_NONBLOCK
;
const
int
result
=
pipe2
(
fds
,
flags
);
#else
...
...
@@ -158,7 +158,7 @@ FileDescriptor::CreatePipeNonBlock(FileDescriptor &r,
r
=
FileDescriptor
(
fds
[
0
]);
w
=
FileDescriptor
(
fds
[
1
]);
#ifndef
HAVE_PIPE2
#ifndef
__linux__
r
.
SetNonBlocking
();
w
.
SetNonBlocking
();
#endif
...
...
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