ludic/ns-process.html
2026-09-17 22:10:03 +00:00

24 lines
No EOL
2.8 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Process — Ludic</title>
<meta name="description" content="Child processes, started and polled — what a launcher is made of.">
<link rel="stylesheet" href="base.css">
<link rel="stylesheet" href="docs.css">
</head>
<body>
<header class="nav"><div class="wrap nav-in"><a class="brand" href="index.html"><span class="logo">L</span> Ludic</a><button class="nav-toggle" aria-label="Toggle menu" aria-expanded="false">☰</button><nav class="nav-links"><a href="index.html">Home</a><a href="api.html">API Reference</a><a class="nav-cta" href="https://git.workshopsoft.io/workshopsoft/ludic">Source ↗</a></nav></div></header>
<main class="wrap item">
<div class="crumbs"><a href="api.html">API Reference</a> <span>›</span> <span class="here">Process</span></div>
<div class="item-head"><span class="kind-badge kind-namespace">namespace</span><h1 id="top">Process</h1></div>
<p class="ns-blurb">Child processes, started and polled — what a launcher is made of. <a href="process-spawn.html"><code>Process.spawn</code></a> starts a program directly, with no shell, and returns at once; each frame <a href="process-poll.html"><code>Process.poll</code></a> answers <code>-1</code> while the child runs and its exit code once it has ended, so a crash is a non-zero code the game can act on. <a href="process-kill.html"><code>Process.kill</code></a> ends a child and <a href="process-free.html"><code>Process.free</code></a> lets a handle go. Pair it with <a href="../app/app-window_hide.html"><code>App.window_hide</code></a> to step aside while the child runs.
The child inherits the environment and the working directory. <code>posix_spawn</code> on macOS; <code>CreateProcessW</code> on Windows, with each argument quoted by the MSVC rules and no console window. Like <code>Http.*</code> it is <strong>out-of-band</strong> and must never feed the deterministic lockstep/replay simulation.</p>
<div class="ns-methods"><a class="ns-method" href="process-spawn.html"><code class="nm-sig">Process.spawn(path, args) -&gt; int</code><span class="nm-tip">Start a program; never blocks.</span></a><a class="ns-method" href="process-poll.html"><code class="nm-sig">Process.poll(handle) -&gt; int</code><span class="nm-tip">-1 while running, else the exit code.</span></a><a class="ns-method" href="process-kill.html"><code class="nm-sig">Process.kill(handle) -&gt; void</code><span class="nm-tip">End a running child.</span></a><a class="ns-method" href="process-free.html"><code class="nm-sig">Process.free(handle) -&gt; void</code><span class="nm-tip">Let a process handle go.</span></a></div>
<a class="back" href="api.html">← All symbols</a>
</main>
<script src="ludic-highlight.js"></script>
<script>Ludic.installCards(); Ludic.flashTarget();</script>
</body></html>