2017 © Pedro Peláez
 

library process

Process utility library for Hack

image

hhpack/process

Process utility library for Hack

  • Monday, June 25, 2018
  • by holyshared
  • Repository
  • 1 Watchers
  • 2 Stars
  • 240 Installations
  • Hack
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 21 Versions
  • 0 % Grown

The README.md

process

Latest Stable Version CircleCI Dependency Status License, (*1)

Basic usage

Start the process, it is an example to wait until the end.
information of stdout and stderr are output to the buffer., (*2)

use HHPack\Process;

<<__EntryPoint>>
async function main() : Awaitable<noreturn>
{
  $result = await Process\exec('hh_client restart');
  $result->stdout()->display();
  $result->stderr()->display();

  $result = await Process\exec('hh_client check --json');
  $result->display();

  exit(0);
}

Execution of the script

If you want to run the script, you can run in execFile function., (*3)

use HHPack\Process;

<<__EntryPoint>>
async function main() : Awaitable<noreturn>
{
  $result = await Process\execFile('/path/to/example.hh', [ 'a', 'b' ]);
  $result->stdout()->display();
  $result->stderr()->display();

  exit(0);
}

Manual control of the process

You can use the spawn function to generate a new child process.
To wait for the generated child process to finish use the wait method., (*4)

use HHPack\Process;
use HHPack\Process\ProcessOptions;

<<__EntryPoint>>
async function pipe_example() : Awaitable<noreturn>
{
  $options = new ProcessOptions();
  $options->stdout(new Stdout());
  $options->stderr(new Stderr());

  using ($p = Process\spawn('hh_client restart', [], $options)) {
    await $p->wait();
  }

  exit(0);
}

Run the test

You can run the test with the following command., (*5)

composer install
composer test

The Versions

25/06 2018

dev-master

9999999-dev

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

25/06 2018

1.4.2

1.4.2.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

25/06 2018

dev-feature/hhvm3.27

dev-feature/hhvm3.27

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

13/05 2018

1.4.1

1.4.1.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

17/04 2018

1.4.0

1.4.0.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

17/04 2018

dev-feature/async_stream

dev-feature/async_stream

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

27/03 2018

1.3.0

1.3.0.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

27/03 2018

dev-feature/hhvm3.25

dev-feature/hhvm3.25

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

25/01 2018

1.2.2

1.2.2.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

25/01 2018

dev-feature/hhvm3.24

dev-feature/hhvm3.24

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

03/10 2017

1.2.1

1.2.1.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

22/08 2017

dev-feature/autoload

dev-feature/autoload

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

22/08 2017

1.2.0

1.2.0.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

06/07 2017

1.1.0

1.1.0.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.18.0

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

17/02 2017

1.0.0

1.0.0.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.11.0

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

16/01 2016

0.4.0

0.4.0.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.11.0

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

09/01 2016

0.3.1

0.3.1.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.6

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

29/11 2015

0.3.0

0.3.0.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.6

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

17/11 2015

0.2.0

0.2.0.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.6

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

16/11 2015

0.1.1

0.1.1.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.6

 

The Development Requires

by Noritaka Horio

utility easy hack simple process

26/10 2015

0.1.0

0.1.0.0

Process utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.6

 

The Development Requires

by Noritaka Horio

utility easy hack simple process