Christopher Yeoh wrote: > At 2002/3/25 21:27-0500 Joey Hess writes: > > The test does a setlogmask(LOG_MASK(LOG_DEBUG|LOG_WARNING)). This does not > > seem to be a valid way to call LOG_MASK in glibc; I don't know about POSIX. > > glibc wants it to be called like this: > > setlogmask(LOG_MASK(LOG_DEBUG)|LOG_MASK(LOG_WARNING)) > > > > Note that the log priorities are numbered, 0 through 7, and are so not > > directly or'able. That's why LOG_MASK exists, no? > > > > SUSv3 seems to imply that it is ok to use them directly or'able. One > of the examples does exactly that: > > http://www.opengroup.org/onlinepubs/007904975/toc.htm > > So perhaps it is a glibc bug in defining them the way they have.
Changing this would be a real PITA as every program that uses syslog would have to be recompiled. I take it you mean this example: int mask = LOG_MASK (LOG_ERR | LOG_USER); ... result = setlogmask(mask); I'm not sure what they're trying to do here, since LOG_USER is a facility, not a priority level. Anyway, I don't see any examples that show or'ing together of two priority levels. -- see shy jo -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with subject of "unsubscribe". Trouble? Email [EMAIL PROTECTED]
