2017 © Pedro Peláez
 

library process-manager

Provides a simple locking mechanism based on UNIX process id's written to a PID file.

image

liip/process-manager

Provides a simple locking mechanism based on UNIX process id's written to a PID file.

  • Wednesday, July 30, 2014
  • by lsmith
  • Repository
  • 43 Watchers
  • 34 Stars
  • 33,695 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 5 Versions
  • 4 % Grown

The README.md

ProcessManager

Provides a simple locking mechanism based on UNIX process id's written to a "PID file"., (*1)

Build Status, (*2)

http://github.com/liip/LiipProcessManager.git, (*3)

Here is a simple example, (*4)

<?php
use Liip\ProcessManager\ProcessManager;
use Liip\ProcessManager\PidFile;

// run a process in the back ground
$processManager = new ProcessManager();
$pid = $processManager->execProcess('sleep 10m');
$processManager->isProcessRunning($pid)
$processManager->killProcess($pid);

// to set log location instead of routing it to /dev/null by default
$processManager = new ProcessManager('/path/to/logfile');
$pid = $processManager->execProcess('sleep 10m');

// acquire a lock via a pid file
$lock = new PidFile(new ProcessManager(), '/tmp/foobar');
$lock->acquireLock();
$pid = $lock->execProcess('sleep 10m');
// set the PID which should be locked on
$lock->setPid(getmypid());
$lock->releaseLock();

The Versions

30/07 2014

dev-master

9999999-dev

Provides a simple locking mechanism based on UNIX process id's written to a PID file.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

locking pid unix

30/07 2014

1.0.3

1.0.3.0

Provides a simple locking mechanism based on UNIX process id's written to a PID file.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

locking pid unix

24/04 2014

1.0.2

1.0.2.0

Provides a simple locking mechanism based on UNIX process id's written to a PID file.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

locking pid unix

19/11 2013

1.0.1

1.0.1.0

Provides a simple locking mechanism based on UNIX process id's written to a PID file.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

locking pid unix

30/09 2013

1.0.0

1.0.0.0

Provides a simple locking mechanism based on UNIX process id's written to a PID file.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

locking pid unix