pinnacle/api/lua/doc/index.html
2023-07-22 17:43:36 -05:00

180 lines
4.5 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Pinnacle</h1>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Fields">Fields</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><strong>ProcessModule</strong></li>
</ul>
</div>
<div id="content">
<h1>Module <code>ProcessModule</code></h1>
<p>
</p>
<p>
</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#process_module.spawn">process_module.spawn (command, callback)</a></td>
<td class="summary">Spawn a process with an optional callback for its stdout, stderr, and exit information.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#process_module.spawn_once">process_module.spawn_once (command, callback)</a></td>
<td class="summary">Spawn a process only if it isn't already running, with an optional callback for its stdout, stderr, and exit information.</td>
</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#args">args</a></td>
<td class="summary">
</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "process_module.spawn"></a>
<strong>process_module.spawn (command, callback)</strong>
</dt>
<dd>
Spawn a process with an optional callback for its stdout, stderr, and exit information. </p>
<p><code>callback</code> has the following parameters:
- <code>stdout</code> - The process's stdout printed this line.
- <code>stderr</code> - The process's stderr printed this line.
- <code>exit_code</code> - The process exited with this code.
- <code>exit_msg</code> - The process exited with this message.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">command</span>
string|string[] The command as one whole string or a table of each of its arguments
</li>
<li><span class="parameter">callback</span>
fun(stdout: string|nil, stderr: string|nil, exit<em>code: integer|nil, exit</em>msg: string|nil)? A callback to do something whenever the process's stdout or stderr print a line, or when the process exits.
</li>
</ul>
</dd>
<dt>
<a name = "process_module.spawn_once"></a>
<strong>process_module.spawn_once (command, callback)</strong>
</dt>
<dd>
Spawn a process only if it isn't already running, with an optional callback for its stdout, stderr, and exit information. </p>
<p><code>callback</code> has the following parameters:
- <code>stdout</code>: The process's stdout printed this line.
- <code>stderr</code>: The process's stderr printed this line.
- <code>exit_code</code>: The process exited with this code.
- <code>exit_msg</code>: The process exited with this message.</p>
<p><a href="index.html#process_module.spawn_once">spawn_once</a> checks for the process using <code>pgrep</code>. If your system doesn't have <code>pgrep</code>, this won't work properly.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">command</span>
string|string[] The command as one whole string or a table of each of its arguments
</li>
<li><span class="parameter">callback</span>
fun(stdout: string|nil, stderr: string|nil, exit<em>code: integer|nil, exit</em>msg: string|nil)? A callback to do something whenever the process's stdout or stderr print a line, or when the process exits.
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
<dl class="function">
<dt>
<a name = "args"></a>
<strong>args</strong>
</dt>
<dd>
<ul>
<li><span class="parameter">args</span>
Args
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-07-22 11:35:14 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>