NetBSD Problem Report #44768
From jruohone@gmail.com Fri Mar 25 08:56:52 2011
Return-Path: <jruohone@gmail.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 2250263B8DE
for <gnats-bugs@gnats.netbsd.org>; Fri, 25 Mar 2011 08:56:52 +0000 (UTC)
Message-Id: <20110325085646.2B39756C5@marx.bitnet>
Date: Fri, 25 Mar 2011 10:56:46 +0200 (EET)
From: Jukka Ruohonen <jruohonen@iki.fi>
Sender: a b <jruohone@gmail.com>
Reply-To: jruohonen@iki.fi
To: gnats-bugs@gnats.NetBSD.org
Subject: sched_rr_get_interval(3) should fail with invalid PID
X-Send-Pr-Version: 3.95
>Number: 44768
>Category: lib
>Synopsis: sched_rr_get_interval(3) should fail with invalid PID
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 25 09:00:01 +0000 2011
>Originator: Jukka Ruohonen
>Release: -
>Organization:
-
>Environment:
>Description:
From IEEE Std 1003.1-2008:
The sched_rr_get_interval() function SHALL fail if:
[ESRCH]
No process can be found corresponding to that specified by pid.
Yet
int
/*ARGSUSED*/
sched_rr_get_interval(pid_t pid, struct timespec *interval)
{
interval->tv_sec = 0;
interval->tv_nsec = sysconf(_SC_SCHED_RT_TS) * 1000;
return 0;
}
>How-To-Repeat:
Pass an invalid PID.
>Fix:
Check for valid PID or forget this.
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.