From e813da324dee0f2fb3944530a893970e743d60c4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 1 Aug 1993 20:03:45 +0000 Subject: Formerly misc.c.~27~ --- misc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'misc.c') 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); } -- cgit v1.2.3