Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/sys



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?

- Jukka.


Home | Main Index | Thread Index | Old Index