PHPackages                             graftype/nohup - 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. graftype/nohup

ActiveLibrary

graftype/nohup
==============

A library to run a command in the background, it will return the process's pid, and get it's is running status anytime in the another process, and can be stoped anytime.

1.0.12(2y ago)139MITPHP

Since Aug 9Pushed 2y agoCompare

[ Source](https://github.com/graftype/nohup)[ Packagist](https://packagist.org/packages/graftype/nohup)[ RSS](/packages/graftype-nohup/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (0)

php-nohup
=========

[](#php-nohup)

A library to run a command in the background, it will return the process's pid, and get it's is running status anytime in the another process, and can be stoped anytime.

Navigation
==========

[](#navigation)

- [Installation](#installation)
- [Usage](#usage)
    - [Run a script in background](#run-a-script-in-background)
    - [Create process from known pid ($pid)](#create-process-from-known-pid-pid)

Installation
============

[](#installation)

Using composer:

```
composer require graftype/nohup
```

Usage
=====

[](#usage)

Run a script in background
--------------------------

[](#run-a-script-in-background)

```
use graftype\nohup;

$process = Nohup::run('sleep 5');
```

It will be running in the background for 5 seconds.

But, it can be stoped any time:

```
//...
$process->stop();
```

It stoped now!

Get the pid : `$process->getPid()`, it will return the real pid in both window and \*inx system.

Get it's running status with the function `$process->isRunning()`:

```
use graftype\nohup\Nohup;

$process = Nohup::run('sleep 5');
while ($process->isRunning()) {
    echo '.';
    sleep(1);
}
echo "Done.\n";
```

*output*: `.....Done.`

Create process from known pid ($pid)
------------------------------------

[](#create-process-from-known-pid-pid)

```
use graftype\nohup\Process;

$process = Process::loadFromPid($pid);
// or
$process = new Process($pid);

if ($process->isRunning()) {
    $process->stop();
}
```

### Method:

[](#method)

`Nohup::run($commandLine, $outputFile, $errorFile)`

- `$commandLine`: string, the command will be run.
- `$outputFile`: string, the file path where to save output content.
- `$errlogFile`: string, the file path where to save error message.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~46 days

Recently: every ~0 days

Total

13

Last Release

820d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/897ac1a2442a3b169df65481f561426c159810f90ce79b9665e896883420ebba?d=identicon)[sergeykomlev](/maintainers/sergeykomlev)

---

Top Contributors

[![sergeykomlev](https://avatars.githubusercontent.com/u/40078038?v=4)](https://github.com/sergeykomlev "sergeykomlev (25 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/graftype-nohup/health.svg)

```
[![Health](https://phpackages.com/badges/graftype-nohup/health.svg)](https://phpackages.com/packages/graftype-nohup)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.4k855.0k18](/packages/danog-madelineproto)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
