Problem in printing inside shared libary
Hi,
I have the following program
#include <syslog.h>
int main(void)
{
setlogmask (LOG_UPTO (LOG_NOTICE));
openlog ("exampleprog", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
syslog (LOG_NOTICE, "Program started by User %d", getuid ());
syslog (LOG_NOTICE, "A tree falls in a forest");
closelog ();
return 0;
}
This complete program works fine.
But when I use same way to pront inside .so libraries(That is a pam's .so library) ...it doesn't print anything....
Please tell me what can be the problem.
Waiting for ur replies,
Thanks,
Pihu
|