0
I Use This!
Activity Not Available

Project Summary

A job object allows a group of processes to be managed as a unit. Job objects are namable, securable, sharable objects that control attributes of and assign limits to the processes associated with them. Operations performed on the job object affect all processes associated with the job object.
JobObjectWrapper is a .NET abstraction over the Win32 Job Object. With this library you can create job objects, create and assign a process to the job, control process and job limits, and register for the various process- and job-related notification events.

Usage Example:

using System;
using JobManagement;
using System.Diagnostics;

namespace ConsoleApplicationTestJob
{
class Program
{
static void Main(string[] args)
{
JobObject jo = new JobObject();
jo.Events.OnExitProcess += new jobEventHandler(OnExitProcess);
jo.Limits.ActiveProcessLimit = 4;
jo.Limits.Affinity = new IntPtr(1);

ProcessStartInfo si = new ProcessStartInfo("whoami", "/all");
si.RedirectStandardOutput = true;
si.UseShellExecute = false;
si.CreateNoWindow = true;

Process p = jo.CreateProcessSecured(si);
while (!p.StandardOutput.EndOfStream)
{
Console.WriteLine(p.StandardOutput.ReadLine());
}

foreach (System.Diagnostics.Process process in jo.ConstructAssignedProcessList())
{
Console.WriteLine(process.ProcessName + " " + process.Id);
}
Console.ReadKey();
jo.TerminateAllProcesses(42);
}

static void OnExitProcess(object sender, ExitProcessEventArgs args)
{
Console.WriteLine("Process {0} has exited", args.TheProcess == null ? args.TheProcessId.ToString() : args.TheProcess.ProcessName);
}
}
}

Tags

dotnet managed

In a Nutshell, JobObjectWrapper - A .Net wrapper over...

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    55% of companies leverage OSS for production infrastructure
  • ...
    data presented on the Open Hub is available through our API
  • ...
    use of OSS increased in 65% of companies in 2016
  • ...
    by exploring contributors within projects, you can view details on every commit they have made to that project

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Community Rating

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!
Sample ohloh analysis