From: Ulrich Drepper Date: Thu, 12 May 2011 03:58:02 +0000 (+0100) Subject: Fix sched_setscheduler call in spawn implementation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bb6bfdf659cd1a04c5d93282535b8a9e320fc7d;p=thirdparty%2Fglibc.git Fix sched_setscheduler call in spawn implementation (cherry picked from commit f574184a0e4b6ed69a5d9a3234543fba6d2a7367) --- diff --git a/ChangeLog b/ChangeLog index ad835e65f7a..5a63842eef5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2011-05-11 Ulrich Drepper + [BZ #12052] + * sysdeps/posix/spawni.c (__spawni): Fix sched_setscheduler call. + [BZ #12625] * misc/mntent_r.c (addmntent): Flush the stream after the output diff --git a/sysdeps/posix/spawni.c b/sysdeps/posix/spawni.c index 29803a8461d..1c50f8e50fb 100644 --- a/sysdeps/posix/spawni.c +++ b/sysdeps/posix/spawni.c @@ -142,9 +142,7 @@ __spawni (pid_t *pid, const char *file, } else if ((flags & POSIX_SPAWN_SETSCHEDULER) != 0) { - if (__sched_setscheduler (0, attrp->__policy, - (flags & POSIX_SPAWN_SETSCHEDPARAM) != 0 - ? &attrp->__sp : NULL) == -1) + if (__sched_setscheduler (0, attrp->__policy, &attrp->__sp) == -1) _exit (SPAWN_ERROR); } #endif