diff options
author | Christian Franke <christian.franke@t-online.de> | 2024-12-11 12:48:58 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2024-12-12 10:32:00 +0100 |
commit | 06952f41ff4897c615fa838c5daf571aacb55d0f (patch) | |
tree | 572a5dbe1ae3e194b34b6c44406abde0634a8e77 /winsup/cygwin/spawn.cc | |
parent | a31a6fe5dd36616ac4ccbb62958072413265e563 (diff) | |
download | newlib-06952f41ff4897c615fa838c5daf571aacb55d0f.zip newlib-06952f41ff4897c615fa838c5daf571aacb55d0f.tar.gz newlib-06952f41ff4897c615fa838c5daf571aacb55d0f.tar.bz2 |
Cygwin: sched_setscheduler: accept SCHED_RESET_ON_FORK flag
Add SCHED_RESET_ON_FORK to <sys/sched.h>. If this flag is set, SCHED_FIFO
and SCHED_RR are reset to SCHED_OTHER and negative nice values are reset to
zero in each child process created with fork(2).
Signed-off-by: Christian Franke <christian.franke@t-online.de>
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 7f9f2df..8016f08 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -800,6 +800,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, child->start_time = time (NULL); /* Register child's starting time. */ child->nice = myself->nice; child->sched_policy = myself->sched_policy; + child->sched_reset_on_fork = false; postfork (child); if (mode != _P_DETACH && (!child.remember () || !child.attach ())) |