2014-10-07 5:04 GMT+02:00 David Lang <[email protected]>: > Are you using a system that has SELinux installed? on such systems the > permissions that rsyslog has when started as a service are different than > when you run it manually as root. > > Yeah, as David says, it's most probably SELinux or something along these lines. Rsyslog does not impose any limits on additional threads a plugin uses internally. For example, omfile uses multiple helper threads when async writes are configured. Also, there is no real difference from rsyslog's PoV between running in a console session vs. as background service. With systemd, the code path is actually the same, as systemd uses -n itself. So if it runs in a console session but not as service, the reason most probably is somewhere in the system config.
HTH Rainer > David Lang > > > On Mon, 6 Oct 2014, Liwei Peng wrote: > > >> In my output plugin (see attached code), because I need to process and >> send >> the messages to some other daemon, I created a new pthread to listen/read >> response from that daemon. All the code works well when I ran by starting >> rsyslog in manual mode. >> >> /usr/sbin/rsyslogd -f/etc/rsyslog.conf -u2 -n -irsyslog.pid >> -M/usr/lib/rsyslog >> >> However, when I ran my plugin with rsyslogd as service, it seems that my >> new thread is started but it is not running properly. I saw the thread >> print out a startup msg but it didn't continue printing new msg as >> expected. >> >> What's wrong with my code? is there limitation on using new pthread? >> >> Liwei >> >> _______________________________________________ > rsyslog mailing list > http://lists.adiscon.net/mailman/listinfo/rsyslog > http://www.rsyslog.com/professional-services/ > What's up with rsyslog? Follow https://twitter.com/rgerhards > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad > of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you > DON'T LIKE THAT. > _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

