On Sun, Mar 18, 2012 at 08:37:20PM +0200, Jukka Ruohonen wrote: > On Sat, Mar 17, 2012 at 10:04:40PM -0400, Christos Zoulas wrote: > > Module Name: src > > Committed By: christos > > Date: Sun Mar 18 02:04:40 UTC 2012 > > > > Modified Files: > > src/lib/libc/sys: sched.c > > > > Log Message: > > fail as the man page says sched_rr_get_interval should. > > #include <string.h> > #include <unistd.h> > #include <errno.h> > #include <sched.h> > +#include <signal.h> > #include <sys/param.h> > #include <sys/types.h> > > @@ -123,6 +124,8 @@ int > sched_rr_get_interval(pid_t pid, struct timespec *interval) > { > > + if (pid && kill(pid, 0) == -1) > + return -1; > interval->tv_sec = 0; > interval->tv_nsec = sysconf(_SC_SCHED_RT_TS) * 1000; > return 0; > > So to return to this: surely this can't be right?
>From the kill man page: sig may be one of the signals specified in sigaction(2) or it may be 0, in which case error checking is performed but no signal is actually sent. Thomas