PHPackages                             andrewfenn/pid-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. andrewfenn/pid-helper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

andrewfenn/pid-helper
=====================

A small helper class used to help you check if code is still running

0.1.0(10y ago)117.8k↓25%12MITPHPPHP &gt;=5.5

Since Sep 1Pushed 10y ago2 watchersCompare

[ Source](https://github.com/andrewfenn/pidhelper)[ Packagist](https://packagist.org/packages/andrewfenn/pid-helper)[ RSS](/packages/andrewfenn-pid-helper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (2)

PID Helper
==========

[](#pid-helper)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Quality Score](https://camo.githubusercontent.com/5f05ac471b7ca376d8d73232f473ceaac66aaa97b61a4599405a7e71b14dd4f5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f616e6472657766656e6e2f70696468656c7065722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/andrewfenn/pidhelper)

[![Total Downloads](https://camo.githubusercontent.com/1bd6dea5b69210ed2b5d20c16fa85526a6bbd8aed95575fdfb9e714f009cecd9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64642f616e6472657766656e6e2f7069642d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andrewfenn/pid-helper)[![Total Downloads](https://camo.githubusercontent.com/ccf41a0be22871617c4641514897279c9d67d8dd3526efac6a6f9a0aaff64b48/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f616e6472657766656e6e2f7069642d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andrewfenn/pid-helper)[![Total Downloads](https://camo.githubusercontent.com/220754141a3e1b5e08cbe67f774ffbb352e1db6c1e375a578e8be4d891f40c28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e6472657766656e6e2f7069642d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andrewfenn/pid-helper)

Just a small helper class designed to allow you to easily keep track of code that is already running so that it doesn't run twice.

### Why yet another PID helper class?

[](#why-yet-another-pid-helper-class)

I wanted a process checker that did things properly on linux. It uses the /proc interface to see if the process is still running. On OSX it uses the ps command.

There is no windows support in this library. If you'd like to add it then please submit a pull request that does something similar to the OSX or Linux implementations.

### How to install

[](#how-to-install)

Add the following to your composer.json file and run `composer update`.

```
    "require": {
        "andrewfenn/pid-helper": "0.1.0"
    }
```

### How to use

[](#how-to-use)

To use it call the code as shown below. This class will check that the process id is still running or not.

```
