procasync

- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
  - General options

# NAME

procasync - script for testing Proc::Async module

# SYNOPSIS

       procasync -start '<program-name> [<args...>]'
       procasync -start <program-name> -start '<args>'

       procasync -jobid [-status] [-stdout] [-stderr] [-wdir] [-rlist] [-done]
       procasync -jobid [-result <file-name>]

       procasync -help
       procasync -version

# DESCRIPTION

A simple script that tests all functions of the `Proc::Async` module.

- it can start an external program, together with its arguments:

         procasync -start 'date -u'
         procasync -start date -start -u

            ID of the started job 'date' '-u':
            /tmp/q4Gi2VNroQ

- it can show the status of started external program

         procasync -jobid /tmp/q4Gi2VNroQ -status

            Status of /tmp/q4Gi2VNroQ:
            completed, exit code 0, completed at Sat May 18 18:54:24 2013, elapsed time 0 seconds

- it can fetch what was written to the standard output streams by the started external program

         procasync -jobid /tmp/q4Gi2VNroQ -stdout -stderr

            STDOUT of the job '/tmp/q4Gi2VNroQ':
            Sat May 18 15:54:24 UTC 2013
            STDERR of the job '/tmp/q4Gi2VNroQ':

- it can show the working directory and the existing result names of the started external program

         procasync -jobid /tmp/q4Gi2VNroQ -wdir -rlist

            Working directory for the job '/tmp/q4Gi2VNroQ':
            /tmp/q4Gi2VNroQ
            List of files with results for the job '/tmp/q4Gi2VNroQ':
            a.file
            b.file

- it can fetch a result itself

         procasync -jobid /tmp/q4Gi2VNroQ -result a.file
         procasync -jobid /tmp/q4Gi2VNroQ -result b.file

- it can show whether the external program finished or not

         procasync -jobid /tmp/q4Gi2VNroQ -done

            Process finished

- it can kill the running external program and clean up its results

         procasync -jobid /tmp/q4Gi2VNroQ -kill -clean

            Killing job '/tmp/q4Gi2VNroQ': failure
            Cleaning data for the job /tmp/q4Gi2VNroQ:
            4 files for job /tmp/q4Gi2VNroQ have been deleted.

# OPTIONS

## General options

-help

  Print documentation and exits.

-version

  Print the version and exits.

-quiet

  Do not pollute STDERR with decorative message.