summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/misc.c b/misc.c
index f7f04ce..d841bb2 100644
--- a/misc.c
+++ b/misc.c
@@ -509,9 +509,13 @@ log_access (flavor)
if (! debug_flag)
return;
- printf ("%s access: user %d (real %d), group %d (real %d)\n",
- flavor, geteuid (), getuid (), getegid (), getgid ());
- fflush (stdout);
+ /* All the other debugging messages go to stdout,
+ but we write this one to stderr because it might be
+ run in a child fork whose stdout is piped. */
+
+ fprintf (stderr, "%s access: user %d (real %d), group %d (real %d)\n",
+ flavor, geteuid (), getuid (), getegid (), getgid ());
+ fflush (stderr);
}