Just ran across this:
C:\\WinDDK\\5384\\tools\\sdv\\bin\\engine>wlimit.exe
wlimit 1.42 - Windows ulimit look-a-like tool for controlling job resources
Features:
* Provides a CLI for controlling a job's resources.
* Can be scripted or used interactively.
* Control memory limits.
* Control wall clock time.
* Control user time.
* All resources are limited over entire job, not just the immediate process.
* See how many resources your job actually used.
* wlimit must be able to break away from a previous job object (if any).
Synopsis:
wlimit [/q] [/e] [/r] [/c] [/s]
[/w secs] [/u secs] [/m megs] cmd [arg1] ... [argn]
/q: quiet
/e: log events (advanced, undocumented)
/r: ignore cmd's return value
/b: allow process to breakaway from wlimit's control
/c: ignore control-c
/s: spare child processes' life at exit.
/w secs: limit wall clock time to 'secs' seconds, 1<=secs<=86400.
/u secs: limit user time to 'secs' seconds, 1<=secs<=86400.
/m megs: limit memory usage to 'megs' Mb, 1<=megs<=65536.
Return values:
1001, If wall clock time is elapsed.
1003, Process failed to execute.
1005, If user time is exceeded.
1004, If memory resource is exceeded.
1006, If control-c was pressed.
1007, If wlimit cannot break away from a previous job object.
0, If cmd terminates OK with exit code n and the /r flags is set
n, If cmd terminates OK with exit code n and the /r flags is not set
Examples:
wlimit emacs
Starts emacs. When you exit emacs any child processes spawned by
emacs will also be killed.
wlimit /w 10 cmd
Starts a new cmd. After 10 seconds it will be terminated.
C:\\WinDDK\\5384\\tools\\sdv\\bin\\engine>