]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix sched_setscheduler call in spawn implementation
authorUlrich Drepper <drepper@gmail.com>
Thu, 12 May 2011 03:58:02 +0000 (04:58 +0100)
committerPetr Baudis <pasky@ucw.cz>
Thu, 26 May 2011 23:25:07 +0000 (01:25 +0200)
(cherry picked from commit f574184a0e4b6ed69a5d9a3234543fba6d2a7367)

ChangeLog
sysdeps/posix/spawni.c

index ad835e65f7a43ad4f9164aff474f172485a86bd0..5a63842eef522030350d6aad7acbe060888a1d7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
 
+       [BZ #12052]
+       * sysdeps/posix/spawni.c (__spawni): Fix sched_setscheduler call.
+
        [BZ #12625]
        * misc/mntent_r.c (addmntent): Flush the stream after the output
 
index 29803a8461dc7d9769daff8787a091b73a27c4a1..1c50f8e50fbf1a0f92e7ab9b29f0e37817b3d206 100644 (file)
@@ -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