I have some code that has worked for years under 32-bit versions of Debian
(and other distros before that). Specifically, it works fine under 32-bit
buster. But on a pristine 64-bit installation it fails, and I can sort-of
understand why, but I don't know how to fix it.

The code tried to create a pthread with SCHED_FIFO policy and a priority of
95. The call to pthread_create() fails with an EPERM error.

If I run ulimit -r, it returns 0, which is probably why the call to
pthread_create() failing, but I don't know what to change so that I (operating
as an ordinary user) can create a SCHED_FIFO thread with priority > 0.

The documentation I've found says to edit /etc/security/limits.conf, and I
have done so, adding the line:
  n7dr            hard    rtprio          99
but that made no difference :-(

None of my notes say that I had to do anything special to get this to work in
the past, but it's possible (barely) that somehow I had to edit a
configuration file of some kind and simply forgot to make a note.

What am I missing/forgetting?

  Doc

-- 
Web:  http://enginehousebooks.com/drevans

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to