Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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
wine
wine-cw
Commits
794b9313
Commit
794b9313
authored
Sep 04, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Disable debug output when stderr goes to /dev/null.
parent
4b273713
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
debug.c
libs/wine/debug.c
+13
-0
No files found.
libs/wine/debug.c
View file @
794b9313
...
...
@@ -26,6 +26,9 @@
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#include "wine/debug.h"
#include "wine/library.h"
...
...
@@ -186,9 +189,19 @@ static void debug_usage(void)
static
void
debug_init
(
void
)
{
char
*
wine_debug
;
struct
stat
st1
,
st2
;
if
(
nb_debug_options
!=
-
1
)
return
;
/* already initialized */
nb_debug_options
=
0
;
/* check for stderr pointing to /dev/null */
if
(
!
fstat
(
2
,
&
st1
)
&&
S_ISCHR
(
st1
.
st_mode
)
&&
!
stat
(
"/dev/null"
,
&
st2
)
&&
S_ISCHR
(
st2
.
st_mode
)
&&
st1
.
st_rdev
==
st2
.
st_rdev
)
{
default_flags
=
0
;
return
;
}
if
((
wine_debug
=
getenv
(
"WINEDEBUG"
)))
{
if
(
!
strcmp
(
wine_debug
,
"help"
))
debug_usage
();
...
...
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