summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--doc/imudp.html8
-rw-r--r--plugins/imudp/imudp.c10
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.
<li><b>SchedulingPolicy</b> &lt;rr/fifo/other&gt;<br>
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).
<li><b>SchedulingPriority</b> &lt;number&gt;<br>
Scheduling priority to use.
</ul>
@@ -57,7 +57,11 @@ burst in number of messages. Default is 10,000.
</ul>
<b>Caveats/Known Bugs:</b>
<ul>
-<li>currently none known</li>
+<li>Scheduling parameters are set <b>after</b> privileges have been dropped.
+In most cases, this means that setting them will not be possible after
+privilege drop. This may be worked around by using a sufficiently-privileged
+user account.
+</li>
</ul>
<p><b>Sample:</b></p>
<p>This sets up an UPD server on port 514:<br>
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