From 9bb6bfdf659cd1a04c5d93282535b8a9e320fc7d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 May 2011 04:58:02 +0100 Subject: Fix sched_setscheduler call in spawn implementation (cherry picked from commit f574184a0e4b6ed69a5d9a3234543fba6d2a7367) --- ChangeLog | 3 +++ sysdeps/posix/spawni.c | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad835e6..5a63842 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 29803a8..1c50f8e 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 -- cgit v1.1