Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Libraries
nghttp2
Commits
900dcf4c
Commit
900dcf4c
authored
Aug 12, 2015
by
Tomasz Buchert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: remove Android-specific code
parent
06a0f348
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
22 deletions
+7
-22
src/shrpx.cc
src/shrpx.cc
+0
-5
src/util.cc
src/util.cc
+7
-17
No files found.
src/shrpx.cc
View file @
900dcf4c
...
@@ -1059,12 +1059,7 @@ void fill_default_config() {
...
@@ -1059,12 +1059,7 @@ void fill_default_config() {
mod_config
()
->
accesslog_file
=
nullptr
;
mod_config
()
->
accesslog_file
=
nullptr
;
mod_config
()
->
accesslog_syslog
=
false
;
mod_config
()
->
accesslog_syslog
=
false
;
mod_config
()
->
accesslog_format
=
parse_log_format
(
DEFAULT_ACCESSLOG_FORMAT
);
mod_config
()
->
accesslog_format
=
parse_log_format
(
DEFAULT_ACCESSLOG_FORMAT
);
#if defined(__ANDROID__) || defined(ANDROID)
// Android does not have /dev/stderr. Use /proc/self/fd/2 instead.
mod_config
()
->
errorlog_file
=
strcopy
(
"/proc/self/fd/2"
);
#else // !__ANDROID__ && ANDROID
mod_config
()
->
errorlog_file
=
strcopy
(
"/dev/stderr"
);
mod_config
()
->
errorlog_file
=
strcopy
(
"/dev/stderr"
);
#endif // !__ANDROID__ && ANDROID
mod_config
()
->
errorlog_syslog
=
false
;
mod_config
()
->
errorlog_syslog
=
false
;
mod_config
()
->
conf_path
=
strcopy
(
"/etc/nghttpx/nghttpx.conf"
);
mod_config
()
->
conf_path
=
strcopy
(
"/etc/nghttpx/nghttpx.conf"
);
mod_config
()
->
syslog_facility
=
LOG_DAEMON
;
mod_config
()
->
syslog_facility
=
LOG_DAEMON
;
...
...
src/util.cc
View file @
900dcf4c
...
@@ -666,27 +666,17 @@ void close_log_file(int &fd) {
...
@@ -666,27 +666,17 @@ void close_log_file(int &fd) {
}
}
int
open_log_file
(
const
char
*
path
)
{
int
open_log_file
(
const
char
*
path
)
{
if
(
strcmp
(
path
,
"/dev/stdout"
)
==
0
)
{
if
(
strcmp
(
path
,
"/dev/stdout"
)
==
0
||
strcmp
(
path
,
"/proc/self/fd/1"
)
==
0
)
{
return
STDOUT_FILENO
;
return
STDOUT_FILENO
;
}
}
if
(
strcmp
(
path
,
"/dev/stderr"
)
==
0
)
{
return
STDERR_FILENO
;
}
#if defined(__ANDROID__) || defined(ANDROID)
int
fd
;
if
(
strcmp
(
"/proc/self/fd/1"
,
path
)
==
0
||
strcmp
(
"/proc/self/fd/2"
,
path
)
==
0
)
{
// We will get permission denied error when O_APPEND is used for
if
(
strcmp
(
path
,
"/dev/stderr"
)
==
0
||
// these paths.
strcmp
(
path
,
"/proc/self/fd/2"
)
==
0
)
{
fd
=
return
STDERR_FILENO
;
open
(
path
,
O_WRONLY
|
O_CREAT
|
O_CLOEXEC
,
S_IRUSR
|
S_IWUSR
|
S_IRGRP
);
}
else
{
fd
=
open
(
path
,
O_WRONLY
|
O_APPEND
|
O_CREAT
|
O_CLOEXEC
,
S_IRUSR
|
S_IWUSR
|
S_IRGRP
);
}
}
#
el
if defined O_CLOEXEC
#if defined O_CLOEXEC
auto
fd
=
open
(
path
,
O_WRONLY
|
O_APPEND
|
O_CREAT
|
O_CLOEXEC
,
auto
fd
=
open
(
path
,
O_WRONLY
|
O_APPEND
|
O_CREAT
|
O_CLOEXEC
,
S_IRUSR
|
S_IWUSR
|
S_IRGRP
);
S_IRUSR
|
S_IWUSR
|
S_IRGRP
);
...
...
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