summaryrefslogtreecommitdiff
path: root/doc/foreground.html
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-09-18 20:03:23 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-09-18 20:03:23 +0000
commitf316a2ed52195135a35e32d7096e876357c48c69 (patch)
tree5f4486b9a5a213a69e66ef574d6bc643a207981c /doc/foreground.html
downloadexecline-f316a2ed52195135a35e32d7096e876357c48c69.tar.xz
initial commit: rc for execline-2.0.0.0
Diffstat (limited to 'doc/foreground.html')
-rw-r--r--doc/foreground.html57
1 files changed, 57 insertions, 0 deletions
diff --git a/doc/foreground.html b/doc/foreground.html
new file mode 100644
index 0000000..a2a465f
--- /dev/null
+++ b/doc/foreground.html
@@ -0,0 +1,57 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>execline: the foreground command</title>
+ <meta name="Description" content="execline: the foreground command" />
+ <meta name="Keywords" content="execline command foreground" />
+ <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> -->
+ </head>
+<body>
+
+<p>
+<a href="index.html">execline</a><br />
+<a href="http://skarnet.org/software/">Software</a><br />
+<a href="http://skarnet.org/">skarnet.org</a>
+</p>
+
+<h1> The <tt>foreground</tt> program </h1>
+
+<p>
+<tt>foreground</tt> executes a sequence of commands.
+</p>
+
+<h2> Interface </h2>
+
+<p>
+ In an <a href="execlineb.html">execlineb</a> script:
+</p>
+
+<pre>
+ foreground { <em>prog1...</em> } <em>prog2...</em>
+</pre>
+
+<ul>
+ <li> <tt>foreground</tt> reads <em>prog1</em> in a
+<a href="el_semicolon.html">block</a>. It forks and
+executes it, then waits for it to complete. </li>
+ <li> <tt>foreground</tt> sets the <tt>?</tt> environment
+variable to the exit code of <em>prog1</em>. If <em>prog1...</em>
+did not exit normally, the <tt>?</tt> value is 111. </li>
+ <li> <tt>foreground</tt> then execs into <em>prog2...</em>. </li>
+</ul>
+
+<h2> Notes </h2>
+
+<ul>
+ <li> <tt>foreground</tt> is the basic sequence operator: it takes two
+commands and executes them one by one. execline scripts require it to
+wrap external commands that exit instead of natively supporting the
+"perform some action, then execute some other program" model. </li>
+ <li> <tt>foreground <em>prog1...</em> "" <em>prog2...</em></tt> is
+equivalent to <tt>sh -c '<em>prog1...</em> ; exec <em>prog2...</em>'</tt>.
+ </li>
+</ul>
+
+</body>
+</html>