From 0003b4e04e1872bf48bb061a9b8865e516834e97 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 21 Mar 2013 15:53:50 +0100 Subject: bugfix: imudp scheduling parameters did affect main thread, not imudp closes: http://bugzilla.adiscon.com/show_bug.cgi?id=409 Conflicts: ChangeLog --- ChangeLog | 2 ++ doc/imudp.html | 8 ++++++-- plugins/imudp/imudp.c | 10 +++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f6c4bf3..1226002e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ Version 7.2.7 [v7-stable] 2013-03-?? - improved debugging support in forked (auto-backgrounding) mode The rsyslog debug log file is now continued to be written across the fork. +- bugfix: imudp scheduling parameters did affect main thread, not imudp + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=409 - bugfix: imuxsock rate-limiting could not be configured via legacy conf Rate-limiting for the system socket could not be configured via legacy configuration directives. However, the new-style RainerScript config diff --git a/doc/imudp.html b/doc/imudp.html index 1ebce4d7..105e0b2a 100644 --- a/doc/imudp.html +++ b/doc/imudp.html @@ -33,7 +33,7 @@ the value, the less precise the timestamp.
  • SchedulingPolicy <rr/fifo/other>
    Can be used the set the scheduler priority, if the necessary functionality is provided by the platform. Most useful to select "fifo" for real-time -processing under Linux (and thus reduce chance of packet loss). +processing under Linux (and thus reduce chance of packet loss).
  • SchedulingPriority <number>
    Scheduling priority to use. @@ -50,7 +50,11 @@ Binds the listener to a specific ruleset.
  • Caveats/Known Bugs:

    Sample:

    This sets up an UPD server on port 514:
    diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index 782d7bee..06e1471d 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -832,7 +832,6 @@ CODESTARTactivateCnfPrePrivDrop ABORT_FINALIZE(RS_RET_NO_RUN); } - setSchedParams(pModConf); finalize_it: ENDactivateCnfPrePrivDrop @@ -865,6 +864,15 @@ ENDfreeCnf */ BEGINrunInput CODESTARTrunInput + /* Note well: the setting of scheduling parameters will not work + * when we dropped privileges (if the user is not sufficently + * privileged, of course). Howerver, we can't change the + * scheduling params in PrePrivDrop(), as at that point our thread + * is not yet created. So at least as an interim solution, we do + * NOT support both setting sched parameters and dropping + * privileges within the same instance. + */ + setSchedParams(runModConf); iRet = rcvMainLoop(pThrd); ENDrunInput -- cgit v1.2.3