You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
3.8 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Process (infer.IBase.Process)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">IBase</a> &#x00BB; Process</nav><h1>Module <code>IBase.Process</code></h1></header><dl><dt class="spec value" id="val-create_process_and_wait"><a href="#val-create_process_and_wait" class="anchor"></a><code><span class="keyword">val</span> create_process_and_wait : <span>prog:string</span> <span>&#45;&gt;</span> <span>args:<span>string list</span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Given an command to be executed, creates a process to execute this command, and waits for its execution. The standard out and error are not redirected. If the commands fails to execute, prints an error message and exits.</p></dd></dl><dl><dt class="spec type" id="type-action"><a href="#type-action" class="anchor"></a><code><span class="keyword">type</span> action</code><code> = </code><table class="variant"><tr id="type-action.ReadStdout" class="anchored"><td class="def constructor"><a href="#type-action.ReadStdout" class="anchor"></a><code>| </code><code><span class="constructor">ReadStdout</span></code></td></tr><tr id="type-action.ReadStderr" class="anchored"><td class="def constructor"><a href="#type-action.ReadStderr" class="anchor"></a><code>| </code><code><span class="constructor">ReadStderr</span></code></td></tr></table></dt></dl><dl><dt class="spec value" id="val-create_process_and_wait_with_output"><a href="#val-create_process_and_wait_with_output" class="anchor"></a><code><span class="keyword">val</span> create_process_and_wait_with_output : <span>prog:string</span> <span>&#45;&gt;</span> <span>args:<span>string list</span></span> <span>&#45;&gt;</span> <a href="index.html#type-action">action</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Given an command to be executed, creates a process to execute this command, and waits for its execution. Depending on the action passed, either stdout or stderr is returned, with the other being streamed to the console. If the commands fails to execute, prints an error message and exits.</p></dd></dl><dl><dt class="spec value" id="val-print_error_and_exit"><a href="#val-print_error_and_exit" class="anchor"></a><code><span class="keyword">val</span> print_error_and_exit : <span>?&#8288;exit_code:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, Stdlib.Format.formatter, unit, <span class="type-var">'b</span>)</span> <a href="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.format4</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>Prints an error message to a log file, prints a message saying that the error can be found in that file, and exist, with default code 1 or a given code.</p></dd></dl><dl><dt class="spec value" id="val-pipeline"><a href="#val-pipeline" class="anchor"></a><code><span class="keyword">val</span> pipeline : <span>producer_prog:string</span> <span>&#45;&gt;</span> <span>producer_args:<span>string list</span></span> <span>&#45;&gt;</span> <span>consumer_prog:string</span> <span>&#45;&gt;</span> <span>consumer_args:<span>string list</span></span> <span>&#45;&gt;</span> <a href="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Unix.Exit_or_signal.t * <a href="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Unix.Exit_or_signal.t</code></dt><dd><p>Pipeline producer program into consumer program</p></dd></dl></div></body></html>