ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/win_process.c
(Generate patch)

Comparing ray/src/common/win_process.c (file contents):
Revision 3.1 by schorsch, Thu Jun 26 00:58:09 2003 UTC vs.
Revision 3.4 by schorsch, Tue Oct 21 19:19:28 2003 UTC

# Line 16 | Line 16 | static char RCSid[]="$Id$";
16   #include <io.h>      /* _open_osfhandle */
17   #include <fcntl.h>   /* _O_XXX */
18  
19 < #include "standard.h"
19 > #include "rterror.h"
20 > #include "rtio.h"
21   #include "rtprocess.h"
22  
23  
24 < /* Looks like some Windows versions use negative PIDs.
25 <   Let's just hope they either make them *all* negative, or none.  */
26 < static int system_uses_negative_pids = 0;
24 > int
25 > win_nice(int inc) /* simple nice(2) replacement for Windows */
26 > {
27 >        /* We don't have much granularity available: IDLE_PRIORITY_CLASS
28 >           will run whenever no other higher priority process is running */
29 >        if (inc > 0) {
30 >                return (int)!SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
31 >        }
32 >        return 0;
33 > }
34  
35  
36   /*
# Line 270 | Line 278 | open_process(SUBPROC *proc, char *av[])
278   {
279          char *cmdpath;
280          char *cmdstr;
273        int res;
281  
282          proc->running = 0;
283          cmdpath = getpath(av[0], getenv("PATH"), X_OK);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines