EphemeralMongo The desired MongoDB version to download and use. The version is not supported. The desired MongoDB edition to download and use. The edition is not supported. The directory where the mongod instance stores its data. If not specified, a temporary directory will be used. The path is invalid. The directory where your own MongoDB binaries can be found (mongod, mongoexport and mongoimport). The path is invalid. Additional mongod CLI arguments. Maximum timespan to wait for mongod process to be ready to accept connections. The timeout cannot be negative. Whether to create a single node replica set or use a standalone mongod instance. Maximum timespan to wait for the replica set to accept database writes. The timeout cannot be negative. A delegate that provides access to any MongodDB-related process standard output. A delegate that provides access to any MongodDB-related process error output. The mongod port to use. If not specified, a random available port will be used. The port must be greater than zero. The lifetime of data directories that are automatically created when they are not specified by the user. When their age exceeds this value, they will be deleted on the next run of MongoRunner. The lifetime cannot be negative. The HTTP transport to use for downloading MongoDB binaries and MongoDB release information. The maximum timespan to wait before checking for a newer version of MongoDB binaries. The timeout cannot be negative. A pointer to a null-terminated, constant character string. A pointer to the first character in the string. The content should be considered readonly, as it was typed as constant in the SDK. Gets the number of characters up to the first null character (exclusive). Returns a with a copy of this character array, up to the first null character (exclusive). A , or if is . Returns a span of the characters in this string, up to the first null character (exclusive). Contains I/O accounting information for a process or a job object. Learn more about this API from docs.microsoft.com. The number of read operations performed. The number of write operations performed. The number of I/O operations performed, other than read and write operations. The number of bytes read. The number of bytes written. The number of bytes transferred during operations other than read and write operations. Contains basic limit information for a job object. Processes can still empty their working sets using the SetProcessWorkingSetSize function with (SIZE_T)-1, even when JOB_OBJECT_LIMIT_WORKINGSET is used. However, you cannot use SetProcessWorkingSetSize change the minimum or maximum working set size of a process in a job object. The system increments the active process count when you attempt to associate a process with a job. If the limit is exceeded, the system decrements the active process count only when the process terminates and all handles to the process are closed. Therefore, if you have an open handle to a process that has been terminated in such a manner, you cannot associate any new processes until the handle is closed and the active process count is below the limit. Read more on docs.microsoft.com. If LimitFlags specifies JOB_OBJECT_LIMIT_PROCESS_TIME, this member is the per-process user-mode execution time limit, in 100-nanosecond ticks. Otherwise, this member is ignored. The system periodically checks to determine whether each process associated with the job has accumulated more user-mode time than the set limit. If it has, the process is terminated. If the job is nested, the effective limit is the most restrictive limit in the job chain. Read more on docs.microsoft.com. If LimitFlags specifies JOB_OBJECT_LIMIT_JOB_TIME, this member is the per-job user-mode execution time limit, in 100-nanosecond ticks. Otherwise, this member is ignored. The system adds the current time of the processes associated with the job to this limit. For example, if you set this limit to 1 minute, and the job has a process that has accumulated 5 minutes of user-mode time, the limit actually enforced is 6 minutes. The system periodically checks to determine whether the sum of the user-mode execution time for all processes is greater than this end-of-job limit. If it is, the action specified in the EndOfJobTimeAction member of the JOBOBJECT_END_OF_JOB_TIME_INFORMATION structure is carried out. By default, all processes are terminated and the status code is set to ERROR_NOT_ENOUGH_QUOTA. To register for notification when this limit is exceeded without terminating processes, use the SetInformationJobObject function with the JobObjectNotificationLimitInformation information class. Read more on docs.microsoft.com. If LimitFlags specifies JOB_OBJECT_LIMIT_WORKINGSET, this member is the minimum working set size in bytes for each process associated with the job. Otherwise, this member is ignored. If MaximumWorkingSetSize is nonzero, MinimumWorkingSetSize cannot be zero. Read more on docs.microsoft.com. If LimitFlags specifies JOB_OBJECT_LIMIT_WORKINGSET, this member is the maximum working set size in bytes for each process associated with the job. Otherwise, this member is ignored. If MinimumWorkingSetSize is nonzero, MaximumWorkingSetSize cannot be zero. Read more on docs.microsoft.com. If LimitFlags specifies JOB_OBJECT_LIMIT_ACTIVE_PROCESS, this member is the active process limit for the job. Otherwise, this member is ignored. If you try to associate a process with a job, and this causes the active process count to exceed this limit, the process is terminated and the association fails. Read more on docs.microsoft.com. If LimitFlags specifies JOB_OBJECT_LIMIT_AFFINITY, this member is the processor affinity for all processes associated with the job. Otherwise, this member is ignored. The affinity must be a subset of the system affinity mask obtained by calling the GetProcessAffinityMask function. The affinity of each thread is set to this value, but threads are free to subsequently set their affinity, as long as it is a subset of the specified affinity mask. Processes cannot set their own affinity mask. Read more on docs.microsoft.com. If LimitFlags specifies JOB_OBJECT_LIMIT_PRIORITY_CLASS, this member is the priority class for all processes associated with the job. Otherwise, this member is ignored. Processes and threads cannot modify their priority class. The calling process must enable the SE_INC_BASE_PRIORITY_NAME privilege. Read more on docs.microsoft.com. If LimitFlags specifies JOB_OBJECT_LIMIT_SCHEDULING_CLASS, this member is the scheduling class for all processes associated with the job. Otherwise, this member is ignored. The valid values are 0 to 9. Use 0 for the least favorable scheduling class relative to other threads, and 9 for the most favorable scheduling class relative to other threads. By default, this value is 5. To use a scheduling class greater than 5, the calling process must enable the SE_INC_BASE_PRIORITY_NAME privilege. Read more on docs.microsoft.com. Contains basic and extended limit information for a job object. The system tracks the value of PeakProcessMemoryUsed and PeakJobMemoryUsed constantly. This allows you know the peak memory usage of each job. You can use this information to establish a memory limit using the JOB_OBJECT_LIMIT_PROCESS_MEMORY or JOB_OBJECT_LIMIT_JOB_MEMORY value. Note that the job memory and process memory limits are very similar in operation, but they are independent. You could set a job-wide limit of 100 MB with a per-process limit of 10 MB. In this scenario, no single process could commit more than 10 MB, and the set of processes associated with a job could never exceed 100 MB. To register for notifications that a job has exceeded its peak memory limit while allowing processes to continue to commit memory, use the SetInformationJobObject function with the JobObjectNotificationLimitInformation information class. Read more on docs.microsoft.com. A JOBOBJECT_BASIC_LIMIT_INFORMATION structure that contains basic limit information. Read more on docs.microsoft.com. Reserved. If the LimitFlags member of the JOBOBJECT_BASIC_LIMIT_INFORMATION structure specifies the JOB_OBJECT_LIMIT_PROCESS_MEMORY value, this member specifies the limit for the virtual memory that can be committed by a process. Otherwise, this member is ignored. Read more on docs.microsoft.com. If the LimitFlags member of the JOBOBJECT_BASIC_LIMIT_INFORMATION structure specifies the JOB_OBJECT_LIMIT_JOB_MEMORY value, this member specifies the limit for the virtual memory that can be committed for the job. Otherwise, this member is ignored. Read more on docs.microsoft.com. The peak memory used by any process ever associated with the job. The peak memory usage of all processes currently associated with the job. Contains extern methods from "KERNEL32.dll". Closes an open object handle. A valid handle to an open object. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. If the application is running under a debugger, the function will throw an exception if it receives either a handle value that is not valid or a pseudo-handle value. This can happen if you close a handle twice, or if you call CloseHandle on a handle returned by the FindFirstFile function instead of calling the FindClose function. The CloseHandle function closes handles to the following objects: This doc was truncated. Read more on docs.microsoft.com. Creates or opens a job object. (CreateJobObjectW) A pointer to a SECURITY_ATTRIBUTES structure that specifies the security descriptor for the job object and determines whether child processes can inherit the returned handle. If lpJobAttributes is NULL, the job object gets a default security descriptor and the handle cannot be inherited. The ACLs in the default security descriptor for a job object come from the primary or impersonation token of the creator. Read more on docs.microsoft.com. The name of the job. The name is limited to MAX_PATH characters. Name comparison is case-sensitive. If lpName is NULL, the job is created without a name. If lpName matches the name of an existing event, semaphore, mutex, waitable timer, or file-mapping object, the function fails and the GetLastError function returns ERROR_INVALID_HANDLE. This occurs because these objects share the same namespace. The object can be created in a private namespace. For more information, see Object Namespaces. Terminal Services:  The name can have a "Global\\" or "Local\\" prefix to explicitly create the object in the global or session namespace. The remainder of the name can contain any character except the backslash character (\\). For more information, see Kernel Object Namespaces. Read more on docs.microsoft.com. If the function succeeds, the return value is a handle to the job object. The handle has the JOB_OBJECT_ALL_ACCESS access right. If the object existed before the function call, the function returns a handle to the existing job object and GetLastError returns ERROR_ALREADY_EXISTS. If the function fails, the return value is NULL. To get extended error information, call GetLastError. When a job is created, its accounting information is initialized to zero, all limits are inactive, and there are no associated processes. To assign a process to a job object, use the AssignProcessToJobObject function. To set limits for a job, use the SetInformationJobObject function. To query accounting information, use the QueryInformationJobObject function. All processes associated with a job must run in the same session. A job is associated with the session of the first process to be assigned to the job. Windows Server 2003 and Windows XP:  A job is associated with the session of the process that created it. To close a job object handle, use the CloseHandle function. The job is destroyed when its last handle has been closed and all associated processes have exited. However, if the job has the JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE flag specified, closing the last job object handle terminates all associated processes and then destroys the job object itself. To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the Windows Headers. Read more on docs.microsoft.com. Sets limits for a job object. A handle to the job whose limits are being set. The CreateJobObject or OpenJobObject function returns this handle. The handle must have the JOB_OBJECT_SET_ATTRIBUTES access right. For more information, see Job Object Security and Access Rights. Read more on docs.microsoft.com. The limits or job state to be set for the job. The format of this data depends on the value of JobObjectInfoClass. The size of the job information being set, in bytes. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. Use the SetInformationJobObject function to set several limits in a single call. To establish the limits one at a time or change a subset of the limits, call the QueryInformationJobObject function to obtain the current limits, modify these limits, and then call SetInformationJobObject. You must set security limits individually for each process associated with a job object, rather than setting them for the job object itself. For information, see Process Security and Access Rights. Windows Server 2003 and Windows XP:  Use the SetInformationJobObject function to set security limits for the job object. To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the Windows Headers. Read more on docs.microsoft.com. Assigns a process to an existing job object. A handle to the job object to which the process will be associated. The CreateJobObject or OpenJobObject function returns this handle. The handle must have the JOB_OBJECT_ASSIGN_PROCESS access right. For more information, see Job Object Security and Access Rights. Read more on docs.microsoft.com. A handle to the process to associate with the job object. The handle must have the PROCESS_SET_QUOTA and PROCESS_TERMINATE access rights. For more information, see Process Security and Access Rights. If the process is already associated with a job, the job specified by hJob must be empty or it must be in the hierarchy of nested jobs to which the process already belongs, and it cannot have UI limits set (SetInformationJobObject with JobObjectBasicUIRestrictions). For more information, see Remarks. Windows 7, Windows Server 2008 R2, Windows XP with SP3, Windows Server 2008, Windows Vista and Windows Server 2003:  The process must not already be assigned to a job; if it is, the function fails with ERROR_ACCESS_DENIED. This behavior changed starting in Windows 8 and Windows Server 2012. Terminal Services:  All processes within a job must run within the same session as the job. Read more on docs.microsoft.com. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. After you associate a process with a job object using AssignProcessToJobObject, the process is subject to the limits set for the job. To set limits for a job, use the SetInformationJobObject function. If the job has a user-mode time limit, and the time limit has been exhausted, AssignProcessToJobObject fails and the specified process is terminated. If the time limit would be exceeded by associating the process, AssignProcessToJobObject still succeeds. However, the time limit violation will be reported. If the job has an active process limit, and the limit would be exceeded by associating this process, AssignProcessToJobObject fails, and the specified process is terminated. Memory operations performed by a process associated with a job that has a memory limit are subject to the memory limit. Memory operations performed by the process before it was associated with the job are not examined by AssignProcessToJobObject. If the process is already running and the job has security limitations, AssignProcessToJobObject may fail. For example, if the primary token of the process contains the local administrators group, but the job object has the security limitation JOB_OBJECT_SECURITY_NO_ADMIN, the function fails. If the job has the security limitation JOB_OBJECT_SECURITY_ONLY_TOKEN, the process must be created suspended. To create a suspended process, call the CreateProcess function with the CREATE_SUSPENDED flag. A process can be associated with more than one job in a hierarchy of nested jobs. For priority class, affinity, commit charge, per-process execution time limit, scheduling class limit, and working set minimum and maximum, the process inherits an effective limit which is the most restrictive limit of all the jobs in its parent job chain. For other resource limits, the process inherits limits from its immediate job in the hierarchy. Accounting information is added to the immediate job and aggregated in each parent job in the job chain. By default, all child processes are associated with the immediate job and every job in the parent job chain. To create a child process that is not part of the same job chain, call the CreateProcess function with the CREATE_BREAKAWAY_FROM_JOB flag. The child process breaks away from every job in the job chain unless a job in the chain does not allow breakaway. In this case, the child process does not break away from that job or any job above it in the job chain. For more information, see Nested Jobs. Windows 7, Windows Server 2008 R2, Windows XP with SP3, Windows Server 2008, Windows Vista and Windows Server 2003:  A process can be associated only with a single job. A process inherits limits from the job it is associated with and adds its accounting information to the job. If a process is associated with a job, all child processes it creates are associated with that job by default. To create a child process that is not part of the same job, call the CreateProcess function with the CREATE_BREAKAWAY_FROM_JOB flag. A process can be associated with more than one job starting in Windows 8 and Windows Server 2012. Windows 7, Windows Server 2008 R2, Windows Server 2008 and Windows Vista:  If the process is being monitored by the Program Compatibility Assistant (PCA), it is placed into a compatibility job. Therefore, the process must be created using CREATE_BREAKAWAY_FROM_JOB before it can be placed in another job. Alternatively, you can embed an application manifest that specifies a User Account Control (UAC) level in your application and PCA will not add the process to the compatibility job. For more information, see Application Development Requirements for User Account Control Compatibility. If the job or any of its parent jobs in the job chain is terminating when AssignProcessToJob is called, the function fails. To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the Windows Headers. Read more on docs.microsoft.com. The SECURITY_ATTRIBUTES structure contains the security descriptor for an object and specifies whether the handle retrieved by specifying this structure is inheritable. The size, in bytes, of this structure. Set this value to the size of the **SECURITY\_ATTRIBUTES** structure. A pointer to a [**SECURITY\_DESCRIPTOR**](../winnt/ns-winnt-security_descriptor.md) structure that controls access to the object. If the value of this member is **NULL**, the object is assigned the default security descriptor associated with the [*access token*](/windows/win32/secauthz/access-tokens) of the calling process. This is not the same as granting access to everyone by assigning a **NULL** [*discretionary access control list*](/windows/win32/secauthz/dacls-and-aces) (DACL). By default, the default DACL in the access token of a process allows access only to the user represented by the access token. For information about creating a security descriptor, see [Creating a Security Descriptor](/windows/win32/secauthz/creating-a-security-descriptor-for-a-new-object-in-c--). Read more on docs.microsoft.com. A Boolean value that specifies whether the returned handle is inherited when a new process is created. If this member is **TRUE**, the new process inherits the handle.