stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: Use of Windows Jobs API in exec utility
Date Fri, 25 Aug 2006 18:56:13 GMT
Andrew Black wrote:
> Greetings all.
> I have started looking at what would be required to implement the child
> process limits logic and child process statistic gathering functionality
> in the exec utility on Windows.
> The research I have done indicates that it is possible to accomplish
> both tasks using the job object API ( 
> ). 

I assume you're looking at this API because it lets you gather
process statistics for not just the child process but also for
the grandchildren, correct? If so, I'm not sure such a total
would be more interesting than the times for just the child
alone (i.e., the Windows analogue of struct rusage obtained
by the getrusage() call, which I think is GetProcessTimes()).

>  The problem with using this API is that it was introduced with Windows 
> 2000 (I think) and is protected by a 'Legacy Macro' ( 

> ).  In this case, the guarding macro is _WIN32_WINNT, which needs to be 
> defined to 0x0500 or higher prior to the inclusion of windows.h.
> There are a few tactics we could take with regards to this situation, 
> and I would appreciate thoughts on which should be taken.
> The simplest method would be to require the exec utility to be built on 
> Windows 2000 or newer versions of the operating system.  The trade off 
> of doing so is that it would be more difficult to build the utility, and 
> by extension the library, on older operating systems.  Unfortunately, I 
> don't know what older versions of windows that the library is still able 
> to build on.

In general, we should try to accommodate all versions of Windows
at least all the way through Windows NT (it's probably safe not
to worry about Windows 98 or prior).


View raw message