Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
a4cd2ad8
Commit
a4cd2ad8
authored
Oct 25, 2012
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avserver: use freopen to redirect stdin/out/err to /dev/null
parent
ada51a33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
avserver.c
avserver.c
+7
-7
No files found.
avserver.c
View file @
a4cd2ad8
...
...
@@ -25,6 +25,7 @@
#endif
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "libavformat/avformat.h"
// FIXME those are internal headers, avserver _really_ shouldn't use them
#include "libavformat/ffm.h"
...
...
@@ -513,13 +514,12 @@ static void start_children(FFStream *feed)
close
(
i
);
if
(
!
avserver_debug
)
{
i
=
open
(
"/dev/null"
,
O_RDWR
);
if
(
i
!=
-
1
)
{
dup2
(
i
,
0
);
dup2
(
i
,
1
);
dup2
(
i
,
2
);
close
(
i
);
}
if
(
!
freopen
(
"/dev/null"
,
"r"
,
stdin
))
http_log
(
"failed to redirect STDIN to /dev/null
\n
;"
);
if
(
!
freopen
(
"/dev/null"
,
"w"
,
stdout
))
http_log
(
"failed to redirect STDOUT to /dev/null
\n
;"
);
if
(
!
freopen
(
"/dev/null"
,
"w"
,
stderr
))
http_log
(
"failed to redirect STDERR to /dev/null
\n
;"
);
}
signal
(
SIGPIPE
,
SIG_DFL
);
...
...
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