You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
684 B
26 lines
684 B
using MediaBrowser.Controller.Diagnostics;
|
|
using System.Diagnostics;
|
|
|
|
namespace MediaBrowser.Server.Mono.Diagnostics
|
|
{
|
|
public class LinuxProcessManager : IProcessManager
|
|
{
|
|
public bool SupportsSuspension
|
|
{
|
|
get { return true; }
|
|
}
|
|
|
|
public void SuspendProcess(Process process)
|
|
{
|
|
// http://jumptuck.com/2011/11/23/quick-tip-pause-process-linux/
|
|
process.StandardInput.WriteLine("^Z");
|
|
}
|
|
|
|
public void ResumeProcess(Process process)
|
|
{
|
|
// http://jumptuck.com/2011/11/23/quick-tip-pause-process-linux/
|
|
process.StandardInput.WriteLine("fg");
|
|
}
|
|
}
|
|
}
|