Browse Source

doc: Add klish-exec picture

Serj Kalichev 1 month ago
parent
commit
1bb0657196
3 changed files with 127 additions and 0 deletions
  1. 125 0
      docs/klish-exec.drawio
  2. BIN
      docs/klish-exec.png
  3. 2 0
      docs/klish3.ru.md

+ 125 - 0
docs/klish-exec.drawio

@@ -0,0 +1,125 @@
+<mxfile host="Electron" modified="2024-03-01T08:58:02.242Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/23.1.5 Chrome/120.0.6099.109 Electron/28.1.0 Safari/537.36" etag="-6EELXzUHl-1P6CvLftN" version="23.1.5" type="device">
+  <diagram name="Страница — 1" id="UFjbOvR3O6Qe7gl92aNO">
+    <mxGraphModel dx="956" dy="605" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+      <root>
+        <mxCell id="0" />
+        <mxCell id="1" parent="0" />
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-7" value="" style="whiteSpace=wrap;html=1;align=center;dashed=1;fillStyle=hatch;fillColor=#EBEBEB;" vertex="1" parent="1">
+          <mxGeometry x="40" y="110" width="640" height="290" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-1" value="&lt;font style=&quot;font-size: 16px;&quot;&gt;Клиент klish&lt;/font&gt;" style="whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="280" y="30" width="240" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-2" value="&lt;font style=&quot;font-size: 18px;&quot;&gt;Основной цикл klishd&lt;/font&gt;" style="whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="80" y="150" width="560" height="90" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-3" value="&lt;b&gt;Исполнение символа&lt;br&gt;&lt;/b&gt;Синхронный символ&lt;br&gt;Без вывода в&lt;br&gt;&amp;nbsp;stdout, stderr" style="shape=ext;margin=3;double=1;whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="80" y="280" width="160" height="80" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-5" value="&lt;b&gt;Исполнение символа&lt;br&gt;&lt;/b&gt;Синхронный символ&lt;br&gt;С выводом в&lt;br&gt;&amp;nbsp;stdout, stderr" style="shape=ext;margin=3;double=1;whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="280" y="280" width="160" height="80" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-6" value="&lt;b&gt;Исполнение символа&lt;br&gt;&lt;/b&gt;Асинхронный символ" style="shape=ext;margin=3;double=1;whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="480" y="430" width="160" height="80" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-8" value="Процесс - приемник&lt;br&gt;stdout, stderr&lt;br&gt;от синхронного символа" style="whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="280" y="430" width="160" height="80" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-9" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.167;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="W7FwdtZu-5o2vGSCx_RX-1">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="390" y="810" as="sourcePoint" />
+            <mxPoint x="320" y="150" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-10" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.167;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="320" y="80" as="sourcePoint" />
+            <mxPoint x="320" y="150" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-11" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.716;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.835;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="W7FwdtZu-5o2vGSCx_RX-2" target="W7FwdtZu-5o2vGSCx_RX-1">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="480" y="80" as="sourcePoint" />
+            <mxPoint x="500" y="90" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-12" value="Обслуживающий сервер klishd" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="40" y="110" width="200" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-13" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.144;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="W7FwdtZu-5o2vGSCx_RX-2" target="W7FwdtZu-5o2vGSCx_RX-3">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="300" y="270" as="sourcePoint" />
+            <mxPoint x="350" y="220" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-15" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.144;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="360.5" y="240" as="sourcePoint" />
+            <mxPoint x="359.5" y="280" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-16" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.857;exitY=0.989;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="W7FwdtZu-5o2vGSCx_RX-2">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="560.5" y="390" as="sourcePoint" />
+            <mxPoint x="559.5" y="430" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-17" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.144;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" target="W7FwdtZu-5o2vGSCx_RX-8">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="360.5" y="360" as="sourcePoint" />
+            <mxPoint x="359.5" y="400" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-18" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="W7FwdtZu-5o2vGSCx_RX-6">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="300" y="270" as="sourcePoint" />
+            <mxPoint x="640" y="200" as="targetPoint" />
+            <Array as="points">
+              <mxPoint x="560" y="540" />
+              <mxPoint x="710" y="540" />
+              <mxPoint x="710" y="200" />
+            </Array>
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-19" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.999;entryY=0.315;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="W7FwdtZu-5o2vGSCx_RX-8" target="W7FwdtZu-5o2vGSCx_RX-2">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="610" y="520" as="sourcePoint" />
+            <mxPoint x="700" y="190" as="targetPoint" />
+            <Array as="points">
+              <mxPoint x="360" y="550" />
+              <mxPoint x="720" y="550" />
+              <mxPoint x="720" y="180" />
+            </Array>
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-20" value="команда, stdin" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="320" y="80" width="90" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-21" value="stdout, stderr" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="485" y="80" width="85" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-23" value="символ (sym)" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="160" y="250" width="90" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-24" value="символ (sym)" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="360" y="250" width="90" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-25" value="символ (sym),&lt;br&gt;stdin" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="560" y="250" width="90" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-26" value="fork()" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="360" y="400" width="40" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-27" value="fork()" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="560" y="400" width="40" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-28" value="stdout, stderr" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="360" y="530" width="80" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="W7FwdtZu-5o2vGSCx_RX-29" value="stdout, stderr" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="560" y="519" width="80" height="20" as="geometry" />
+        </mxCell>
+      </root>
+    </mxGraphModel>
+  </diagram>
+</mxfile>

BIN
docs/klish-exec.png


+ 2 - 0
docs/klish3.ru.md

@@ -181,6 +181,8 @@ shell скрипты, но и скрипты на других интерпре
 (если конфигурировать сборку с --prefix=/usr). Их имена
 `libklish-plugin-<имя>.so`, например `/usr/lib/libklish-plugin-script.so`.
 
+![Исполнение команд](/klish-exec.png "Исполнение команд")
+
 Символы бывают "синхронные" и "асинхронные". Синхронные символы исполняются
 в адресном пространстве klishd, для асинхронных порождается отдельный процесс.