---
name: "Test2::Harness::IPC::Process"
section: "3pm"
platform: "linux"
package: "libtest2-harness-perl"
version: "1.000158-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Test2::Harness::IPC::Process"
---

# Test2::Harness::IPC::Process(3pm)

Base class for processes controlled by Test2::Harness::IPC.

## NAME

Test2::Harness::IPC::Process - Base class for processes controlled by Test2::Harness::IPC.

## DESCRIPTION

All processes controlled by Test2::Harness::IPC should subclass this one.

## ATTRIBUTES

- $int = $proc-\>exit

  Exit value, if set. Otherwise `"undef"`.

- $stamp = $proc-\>exit\_time

  Timestamp of the process exit, if set, otherwise `"undef"`.

- $pid = $proc-\>pid

  Pid of the process, if it has been started.

- $cat = $proc-\>category

  Set at construction, `'default'` if not provided.

## METHODS

- $opt-\>set\_pid($pid)

  Set the process id.

- $opt-\>set\_exit($ipc, $exit, $time)

  Set the process as complete. `$exit` should be the exit value. `$time` should be a timestamp. `$ipc` is an instance of Test2::Harness::IPC.

- $hashref = $opt-\>**spawn\_params()**

  Used when spawning the process, args go to `run_cmd()` from Test2::Harness::Util::IPC.

  The base class throws an exception if this method is called.

## SOURCE

The source code repository for Test2-Harness can be found at *http://github.com/Test-More/Test2-Harness/*.

## MAINTAINERS

- Chad Granum \<exodist@cpan.org\>

  ## AUTHORS

- Chad Granum \<exodist@cpan.org\>

  ## COPYRIGHT

Copyright 2020 Chad Granum \<exodist7@gmail.com\>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See *http://dev.perl.org/licenses/*
