From 72c1491bba149c8fbd9eb81a0a529aa8bad47bb5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 25 Jan 2005 22:45:11 +0000 Subject: * cygwin.din: Export getpriority and setpriority. * fork.cc (fork_parent): Copy parent's nice value into child. * spawn.cc (spawn_guts): Ditto. * miscfuncs.cc (winprio_to_nice): New function. (nice_to_winprio): Ditto. * pinfo.cc (pinfo_init): If parent is not a Cygwin process, set default nice value according to current Win32 priority class. * pinfo.h (class _pinfo): Add nice member. * syscalls.cc (setpriority): New function, only implementing PRIO_PROCESS for now. (getpriority): Ditto. (nice): Just call setpriority. * wincap.h (wincaps::has_extended_priority_class): New element. * wincap.cc: Implement above element throughout. * winsup.h: Add prototypes for winprio_to_nice and nice_to_winprio. * include/limits.h (NZERO): New define. * include/cygwin/types.h (id_t): New datatype. * include/cygwin/version.h: Bump API minor version. * include/sys/resource.h: Add PRIO_XXX defines and prototypes for getpriority and setpriority. --- winsup/cygwin/spawn.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'winsup/cygwin/spawn.cc') diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 68a49f4fe..1f30175da 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -845,6 +845,7 @@ spawn_guts (const char * prog_arg, const char *const *argv, (void) DuplicateHandle (hMainProc, child.shared_handle (), pi.hProcess, NULL, 0, 0, DUPLICATE_SAME_ACCESS); child->start_time = time (NULL); /* Register child's starting time. */ + child->nice = myself->nice; if (!child.remember (mode == _P_DETACH)) { /* FIXME: Child in strange state now */ -- cgit v1.2.3