From 81e45885ac5688318d8ddb00937b43d11c26ee0f 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 --- 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 8138202b..5a6ec24b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ --------------------------------------------------------------------------- Version 7.3.9 [devel] 2013-03-?? +- bugfix: imudp scheduling parameters did affect main thread, not imudp + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=409 - imuxsock: add ability to NOT create/delete sockets during startup and shutdown closes: http://bugzilla.adiscon.com/show_bug.cgi?id=259 diff --git a/doc/imudp.html b/doc/imudp.html index f2d04d65..a86c9939 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. @@ -57,7 +57,11 @@ burst in number of messages. Default is 10,000. 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 dde8f105..7e11a80e 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -853,7 +853,6 @@ CODESTARTactivateCnfPrePrivDrop ABORT_FINALIZE(RS_RET_NO_RUN); } - setSchedParams(pModConf); finalize_it: ENDactivateCnfPrePrivDrop @@ -886,6 +885,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