特権のないユーザーが sched_setscheduler を実行すると 'Operation not permitted' エラーが返される

Solution Verified - Updated -

Issue

優先度を変更するプログラムで sched_setscheduler を実行すると、root 権限で実行すると予想した通りに動作します。非特権ユーザーで実行すると、プログラムは EPERM エラーで失敗します。以下は strace の出力になります。

sched_setscheduler(4798, SCHED_FIFO, { 89 }) = -1 EPERM (Operation not permitted)
sched_setscheduler(4798, SCHED_RR, { 28 }) = -1 EPERM (Operation not permitted)

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.