<html><head><title>procasync</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
BODY {
background: white;
color: black;
font-family: arial,sans-serif;
margin: 0;
padding: 1ex;
}
A:link, A:visited {
background: transparent;
color: #006699;
}
A[href="#POD_ERRORS"] {
background: transparent;
color: #FF0000;
}
DIV {
border-width: 0;
}
DT {
margin-top: 1em;
margin-left: 1em;
}
.pod { margin-right: 20ex; }
.pod PRE {
background: #eeeeee;
border: 1px solid #888888;
color: black;
padding: 1em;
white-space: pre;
}
.pod H1 {
background: transparent;
color: #006699;
font-size: large;
}
.pod H1 A { text-decoration: none; }
.pod H2 A { text-decoration: none; }
.pod H3 A { text-decoration: none; }
.pod H4 A { text-decoration: none; }
.pod H2 {
background: transparent;
color: #006699;
font-size: medium;
}
.pod H3 {
background: transparent;
color: #006699;
font-size: medium;
font-style: italic;
}
.pod H4 {
background: transparent;
color: #006699;
font-size: medium;
font-weight: normal;
}
.pod IMG {
vertical-align: top;
}
.pod .toc A {
text-decoration: none;
}
.pod .toc LI {
line-height: 1.2em;
list-style-type: none;
}
/*]]>*/-->
</style>
</head>
<body class='pod'>
<!--
generated by Pod::Simple::HTML v3.16,
using Pod::Simple::PullParser v3.16,
under Perl v5.014002 at Sat May 18 16:24:33 2013 GMT.
If you want to change this HTML document, you probably shouldn't do that
by changing it directly. Instead, see about changing the calling options
to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
then reconverting this document from the Pod source.
When in doubt, email the author of Pod::Simple::HTML for advice.
See 'perldoc Pod::Simple::HTML' for more info.
-->
<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>
<div class='indexgroup'>
<ul class='indexList indexList1'>
<li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
<li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
<li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
<li class='indexItem indexItem1'><a href='#OPTIONS'>OPTIONS</a>
<ul class='indexList indexList2'>
<li class='indexItem indexItem2'><a href='#General_options'>General options</a>
</ul>
</ul>
</div>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>
<p>procasync - script for testing Proc::Async module</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>
<pre> 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</pre>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>
<p>A simple script that tests all functions of the <code>Proc::Async</code> module.</p>
<ul>
<li>it can start an external program, together with its arguments:
<pre> procasync -start 'date -u'
procasync -start date -start -u
ID of the started job 'date' '-u':
/tmp/q4Gi2VNroQ</pre>
</li>
<li>it can show the status of started external program
<pre> 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</pre>
</li>
<li>it can fetch what was written to the standard output streams by the started external program
<pre> 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':</pre>
</li>
<li>it can show the working directory and the existing result names of the started external program
<pre> 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</pre>
</li>
<li>it can fetch a result itself
<pre> procasync -jobid /tmp/q4Gi2VNroQ -result a.file
procasync -jobid /tmp/q4Gi2VNroQ -result b.file</pre>
</li>
<li>it can show whether the external program finished or not
<pre> procasync -jobid /tmp/q4Gi2VNroQ -done
Process finished</pre>
</li>
<li>it can kill the running external program and clean up its results
<pre> 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.</pre>
</li>
</ul>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="OPTIONS"
>OPTIONS</a></h1>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="General_options"
>General options</a></h2>
<dl>
<dt><a name="-help"
><b>-help</b></a></dt>
<dd>
<p>Print documentation and exits.</p>
<dt><a name="-version"
><b>-version</b></a></dt>
<dd>
<p>Print the version and exits.</p>
<dt><a name="-quiet"
><b>-quiet</b></a></dt>
<dd>
<p>Do not pollute STDERR with decorative message.</p>
</dd>
</dl>
<!-- end doc -->
</body></html>