summaryrefslogtreecommitdiff
path: root/doc/fdmove.html
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-02-14 15:10:15 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2021-02-14 15:10:15 +0000
commit44be69112c71fe65784cc014995044c2a191a449 (patch)
tree774de7de5d75c202903080b74bc5eca87ed1d8d6 /doc/fdmove.html
parent6ff749e62652103b3ab84ef145691602ed6e0fea (diff)
downloadexecline-44be69112c71fe65784cc014995044c2a191a449.tar.xz
Apply doc fixes by flexibeast and suggestions by Profpatsch&aranea
Diffstat (limited to 'doc/fdmove.html')
-rw-r--r--doc/fdmove.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/fdmove.html b/doc/fdmove.html
index 39bdb2b..00a70f0 100644
--- a/doc/fdmove.html
+++ b/doc/fdmove.html
@@ -46,10 +46,15 @@ instead of moving it; do not close <em>fdfrom</em>. </li>
<h2> Notes </h2>
<ul>
- <li> <tt>fdmove -c <em>a</em> <em>b</em> prog...</tt> is roughly equivalent to
-<tt>sh -c 'exec prog... <em>a</em>&gt;&amp;<em>b</em>'</tt></li>
<li> <tt>fdmove <em>a</em> <em>b</em> prog...</tt> is roughly equivalent to
-<tt>sh -c 'exec prog... <em>a</em>&gt;&amp;<em>b</em> <em>b</em>&lt;&amp;-'</tt></li>
+<tt>sh -c 'exec prog... <em>a</em>&gt;&amp;<em>b</em> <em>b</em>&lt;&amp;-'</tt>.
+It means: if you write to fd <em>a</em> now, it will have the same effect as writing
+to fd <em>b</em> beforehand, and you cannot write to fd <em>b</em> anymore. </li>
+ <li> <tt>fdmove -c <em>a</em> <em>b</em> prog...</tt> is roughly equivalent to
+<tt>sh -c 'exec prog... <em>a</em>&gt;&amp;<em>b</em>'</tt>. It means: you can
+now write to fd <em>a</em>, and also still write to fd <em>b</em>, and both will have
+the same effect as writing to fd <em>b</em> beforehand. </li>
+ <li> It also works with file descriptors that are open for reading! </li>
</ul>
</body>