From owner-freebsd-questions@FreeBSD.ORG Wed Feb 16 22:13:13 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5BF1106566B for ; Wed, 16 Feb 2011 22:13:13 +0000 (UTC) (envelope-from mats.w.lindberg@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 78DF28FC08 for ; Wed, 16 Feb 2011 22:13:13 +0000 (UTC) Received: by eyf6 with SMTP id 6so1176887eyf.13 for ; Wed, 16 Feb 2011 14:13:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:content-type:message-id:date:to :content-transfer-encoding:mime-version:x-mailer; bh=vN+vlPyan0APSX3rYoBGE5EOqG9cfIVaqof5Cqd0HS8=; b=vR1Z1rbKCBmH3uMGLJuPfj6M5pkOEB6HcePp+5xerw61XyGnylW3S0AUUT9iKYelk/ /szCTk7p7BnAJcW8RojOdXwgeRqirjxze4icLCBHZBlvGnO6uvHzIJHNhfmcvy4utNeQ Tut5iLyDXGUIZSE+1Ou5Lf9cq5SHSivNdvYPI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:content-type:message-id:date:to :content-transfer-encoding:mime-version:x-mailer; b=bmUvqHq6oZCmZaiDRdmYwscUkO5nCw1OI2yLQaet6H8XeRrhE1W06kuBSaTzWzunYz OL9/+OIxxCcIOTRux8upHqB6aEp9Ryih/eDHauFo8ILebHZkWH5JC6E/91svdW8syzof Gt0Ee1sp4s4ggmkCqR4ofUW55zEgcF+JFpY8Q= Received: by 10.213.105.74 with SMTP id s10mr1263989ebo.24.1297892805322; Wed, 16 Feb 2011 13:46:45 -0800 (PST) Received: from [10.0.1.3] (h139n1fls306o1032.telia.com [81.226.106.139]) by mx.google.com with ESMTPS id q52sm196539eei.9.2011.02.16.13.46.43 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Feb 2011 13:46:44 -0800 (PST) From: Mats Lindbeg Content-Type: text/plain; charset=us-ascii Message-Id: Date: Wed, 16 Feb 2011 22:46:39 +0100 To: "freebsd-questions@freebsd.org" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (iPhone Mail 8C148) X-Mailer: iPhone Mail (8C148) Subject: sched_setscheduler() gives errno EPERM X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 22:13:14 -0000 All, I have a small program that simply changes the scheduling policy to SCHED_RR= with sched_setscheduler and then exec's into another program. This worked f= ine in FBSD 5.x and 6.x. Now when I'm migrating to 8.1 I get EPERM from the t= he setscheduler call. I have learned that If I start the same program with 'rtprio' it is allowed t= o change the scheduler. Strange to me - since I have always run it as root. W= hat is the policy in 8.1?? Can this behavior be circumvented somehow? Some s= ysctl? regards=20 /Mats=