diff --git a/221018-pipe-example/fig/00-parent-begin.svg b/221018-pipe-example/fig/00-parent-begin.svg index ede2f2919e452127ec9cadd5bfb1baadf2990f68..dbc7676399b37e77bcb9ef1502cc9a48a6c9bade 100644 --- a/221018-pipe-example/fig/00-parent-begin.svg +++ b/221018-pipe-example/fig/00-parent-begin.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="0.96143793" - inkscape:cx="264.18762" - inkscape:cy="311.51257" + inkscape:cx="362.4779" + inkscape:cy="331.27464" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -80,6 +80,39 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"> + <text + xml:space="preserve" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583" + x="142.3044" + y="147.98572" + id="text4728-5"><tspan + sodipodi:role="line" + id="tspan4726-7" + style="stroke-width:0.264583" + x="142.3044" + y="147.98572">3 p[0]</tspan></text> + <text + xml:space="preserve" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583" + x="142.37674" + y="153.27026" + id="text4732-0"><tspan + sodipodi:role="line" + id="tspan4730-8" + style="stroke-width:0.264583" + x="142.37674" + y="153.27026">4 p[1]</tspan></text> + <text + xml:space="preserve" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;text-align:center;text-anchor:middle;stroke-width:0.264583" + x="153.60347" + y="164.19684" + id="text6972-1"><tspan + sodipodi:role="line" + id="tspan6970-9" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583" + x="153.60347" + y="164.19684">processus fils</tspan></text> <rect style="fill:#f2f2f2;stroke:#000000;stroke-width:0.1;stroke-dasharray:none;stroke-opacity:1" id="rect6964-9" @@ -139,39 +172,6 @@ style="stroke-width:0.264583" x="142.27339" y="143.19933">2 stderr</tspan></text> - <text - xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583" - x="142.3044" - y="147.98572" - id="text4728-5"><tspan - sodipodi:role="line" - id="tspan4726-7" - style="stroke-width:0.264583" - x="142.3044" - y="147.98572">3 p[0]</tspan></text> - <text - xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583" - x="142.37674" - y="153.27026" - id="text4732-0"><tspan - sodipodi:role="line" - id="tspan4730-8" - style="stroke-width:0.264583" - x="142.37674" - y="153.27026">4 p[1]</tspan></text> - <text - xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;text-align:center;text-anchor:middle;stroke-width:0.264583" - x="153.60347" - y="164.19684" - id="text6972-1"><tspan - sodipodi:role="line" - id="tspan6970-9" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583" - x="153.60347" - y="164.19684">processus fils</tspan></text> <g id="g11249-2" transform="translate(0,129.80128)"> @@ -4171,5 +4171,78 @@ x="151.51085" y="69.661545">processus père</tspan></text> </g> + <text + xml:space="preserve" + style="font-size:4.9389px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583" + x="105.99345" + y="155.90544" + id="text2671"><tspan + sodipodi:role="line" + id="tspan2669" + style="stroke-width:0.264583" + x="105.99345" + y="155.90544" /></text> + <g + id="g10195" + transform="translate(0,-13.503523)"> + <g + id="g10182" + transform="translate(-11.964325,12.708641)"> + <rect + style="fill:#282c34;fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-opacity:1" + id="rect2787" + width="148.82661" + height="11.942157" + x="65.123428" + y="153.14241" /> + <text + xml:space="preserve" + style="font-size:4.9389px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';text-align:center;text-anchor:middle;fill:#dcdfe4;fill-opacity:1;stroke-width:0.264583" + x="139.67058" + y="160.48929" + id="text2733"><tspan + sodipodi:role="line" + id="tspan2731" + style="text-align:center;text-anchor:middle;fill:#dcdfe4;fill-opacity:1;stroke-width:0.264583" + x="139.67058" + y="160.48929"><tspan + style="text-align:center;text-anchor:middle;fill:#61afef;fill-opacity:1" + id="tspan10176">~</tspan> $ ./pipe-example 1>output-file.txt 2>/dev/null</tspan></text> + </g> + <text + xml:space="preserve" + style="font-size:4.9389px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';text-align:center;text-anchor:middle;stroke-width:0.264583" + x="127.56879" + y="185.86705" + id="text10186"><tspan + sodipodi:role="line" + id="tspan10184" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:serif;-inkscape-font-specification:'serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583" + x="127.56879" + y="185.86705">Processus lancé par cette commande</tspan></text> + </g> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="136.24358" + y="7.129312" + id="text11969"><tspan + sodipodi:role="line" + id="tspan11967" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="136.24358" + y="7.129312">les fds pointent au <tspan + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start" + id="tspan11971">bon endroit dès le</tspan></tspan><tspan + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="136.24358" + y="13.302937" + id="tspan11973">lancement du processus</tspan><tspan + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="136.24358" + y="19.476562" + id="tspan11975">(c'est fait par le shell avant exec)</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/01-parent-pipe.svg b/221018-pipe-example/fig/01-parent-pipe.svg index 91e448554ee5cf3f914e3cd5544c84393e4aee6b..4d4f180894a3f322548c6ac26cbd5f3017a5bf92 100644 --- a/221018-pipe-example/fig/01-parent-pipe.svg +++ b/221018-pipe-example/fig/01-parent-pipe.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.0379863" - inkscape:cx="290.46625" - inkscape:cy="437.86703" + inkscape:cx="472.54959" + inkscape:cy="345.38028" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -4077,12 +4077,12 @@ d="m 164.76942,37.039298 h 38.48161" id="path52913" /> <path - style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 161.02013,52.048272 h 21.77513 v 75.725918 h 58.15801 v 12.77337 H 230.4018" id="path70938" sodipodi:nodetypes="cccccc" /> <path - style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 161.44386,57.554015 h 19.04361 v 83.069205 h 22.05073" id="path70940" /> <g @@ -4165,7 +4165,7 @@ id="text4732"><tspan sodipodi:role="line" id="tspan4730" - style="stroke-width:0.264583" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583" x="140.28412" y="58.734962">4 p[1]</tspan></text> <text @@ -4176,9 +4176,31 @@ id="text4728"><tspan sodipodi:role="line" id="tspan4726" - style="stroke-width:0.264583" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583" x="140.21178" y="53.450417">3 p[0]</tspan></text> </g> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583" + x="216.21722" + y="164.30287" + id="text19214"><tspan + sodipodi:role="line" + id="tspan19212" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583" + x="216.21722" + y="164.30287">création du pipe</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="129.30327" + y="14.713733" + id="text19214-3"><tspan + sodipodi:role="line" + id="tspan19212-6" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="129.30327" + y="14.713733">ajout de 2 nouveaux fds pour ce processus</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/02-parent-fork.svg b/221018-pipe-example/fig/02-parent-fork.svg index 54d0adc9a8c2954efeb079e8cf770dca0500cce6..a6f8013d875e4854f8e6288962a3f2438b41f19e 100644 --- a/221018-pipe-example/fig/02-parent-fork.svg +++ b/221018-pipe-example/fig/02-parent-fork.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.4213661" - inkscape:cx="554.04444" - inkscape:cy="542.78766" + inkscape:cx="554.748" + inkscape:cy="543.49122" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -4204,5 +4204,21 @@ x="153.60347" y="164.19684">processus fils</tspan></text> </g> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="125.96134" + y="180.5135" + id="text19214-3"><tspan + sodipodi:role="line" + id="tspan19212-6" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="125.96134" + y="180.5135">le nouveau processus hérite des fds ouverts</tspan><tspan + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="125.96134" + y="186.68713" + id="tspan28384">(mais sa table des fds n'est pas celle du père)</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/05-parent-close.svg b/221018-pipe-example/fig/05-parent-close.svg index 36e70f11d65e24b5443f489efdcc3780479b6e59..1f21cfec6a3ecd137841c6fc980797d6f33f7ca5 100644 --- a/221018-pipe-example/fig/05-parent-close.svg +++ b/221018-pipe-example/fig/05-parent-close.svg @@ -25,12 +25,12 @@ inkscape:deskcolor="#d1d1d1" inkscape:document-units="mm" showgrid="false" - inkscape:zoom="1.311741" - inkscape:cx="492.85646" - inkscape:cy="328.95214" + inkscape:zoom="0.92754096" + inkscape:cx="404.83388" + inkscape:cy="375.72465" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -2120,7 +2120,7 @@ id="path70938" sodipodi:nodetypes="cccccc" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 161.44386,57.554015 h 19.04361 v 83.069205 h 22.05073" id="path70940" /> <text @@ -2195,13 +2195,13 @@ y="48.664028">2 stderr</tspan></text> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583;fill:#ff0000" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;fill:#ff0000;stroke-width:0.264583" x="140.28412" y="58.734962" id="text4732"><tspan sodipodi:role="line" id="tspan4730" - style="stroke-width:0.264583;fill:#ff0000" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:monospace;-inkscape-font-specification:'monospace Bold';fill:#ff0000;stroke-width:0.264583" x="140.28412" y="58.734962">4 p[1]</tspan></text> <text @@ -4201,5 +4201,21 @@ x="153.60347" y="164.19684">processus fils</tspan></text> </g> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="125.65289" + y="10.92132" + id="text19214-3"><tspan + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="125.65289" + y="10.92132" + id="tspan28384">fermeture de l'accès en écriture au pipe</tspan><tspan + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="125.65289" + y="17.094944" + id="tspan38011">(pour ce processus uniquement)</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/06-parent-close-done.svg b/221018-pipe-example/fig/06-parent-close-done.svg index b8ffc23e8a09338610a51cd5135528d40d1c753c..18df8ffdb396f45cb5074a5eedc811a1f3674092 100644 --- a/221018-pipe-example/fig/06-parent-close-done.svg +++ b/221018-pipe-example/fig/06-parent-close-done.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.311741" - inkscape:cx="492.85646" - inkscape:cy="328.95214" + inkscape:cx="505.81632" + inkscape:cy="192.49227" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -4186,5 +4186,21 @@ x="153.60347" y="164.19684">processus fils</tspan></text> </g> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="136.27252" + y="7.129312" + id="text19214-3"><tspan + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="136.27252" + y="7.129312" + id="tspan38011">libération du fd 4 pour ce processus.</tspan><tspan + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583" + x="136.27252" + y="13.302937" + id="tspan48809">un futur fd pourra utiliser ce numéro</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/07-parent-read-blocked.svg b/221018-pipe-example/fig/07-parent-read-blocked.svg index 020eadaa9b0bdd4c70a2a96686d4ffd3e78caa34..1ffb1bf3f3c3f8c46ff33e07003a9c73c5e94933 100644 --- a/221018-pipe-example/fig/07-parent-read-blocked.svg +++ b/221018-pipe-example/fig/07-parent-read-blocked.svg @@ -25,12 +25,12 @@ inkscape:deskcolor="#d1d1d1" inkscape:document-units="mm" showgrid="false" - inkscape:zoom="1.1651814" - inkscape:cx="475.89155" - inkscape:cy="452.71919" + inkscape:zoom="1.6478153" + inkscape:cx="518.56539" + inkscape:cy="349.2503" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -1448,7 +1448,8 @@ id="text3066"><tspan x="0" y="0" - id="tspan3064">r</tspan></text> + id="tspan3064" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">r</tspan></text> <text xml:space="preserve" transform="translate(111.83923,13)" @@ -1456,7 +1457,8 @@ id="text3070"><tspan x="0" y="0" - id="tspan3068">e</tspan></text> + id="tspan3068" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">e</tspan></text> <text xml:space="preserve" transform="translate(119.78565,13)" @@ -1464,7 +1466,8 @@ id="text3074"><tspan x="0" y="0" - id="tspan3072">a</tspan></text> + id="tspan3072" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">a</tspan></text> <text xml:space="preserve" transform="translate(127.73206,13)" @@ -1472,7 +1475,8 @@ id="text3078"><tspan x="0" y="0" - id="tspan3076">d</tspan></text> + id="tspan3076" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">d</tspan></text> <text xml:space="preserve" transform="translate(135.67847,13)" @@ -1480,7 +1484,8 @@ id="text3082"><tspan x="0" y="0" - id="tspan3080">(</tspan></text> + id="tspan3080" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">(</tspan></text> <text xml:space="preserve" transform="translate(143.62488,13)" @@ -1648,7 +1653,8 @@ id="text3166"><tspan x="0" y="0" - id="tspan3164">)</tspan></text> + id="tspan3164" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">)</tspan></text> <text xml:space="preserve" transform="translate(336,13)" @@ -2091,13 +2097,13 @@ y="111.85227" /> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal;fill:#ff0000" x="94.883553" y="133.28987" id="text54908"><tspan sodipodi:role="line" id="tspan54906" - style="stroke-width:0.264583" + style="stroke-width:0.264583;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal;fill:#ff0000" x="94.883553" y="133.28987">pipe:[1137]</tspan></text> </g> @@ -2115,7 +2121,7 @@ d="m 164.76942,37.039298 h 38.48161" id="path52913" /> <path - style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 161.02013,52.048272 h 21.77513 v 75.725918 h 58.15801 v 12.77337 H 230.4018" id="path70938" sodipodi:nodetypes="cccccc" /> @@ -2191,13 +2197,13 @@ y="48.664028">2 stderr</tspan></text> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583;fill:#ff0000;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="140.21178" y="53.450417" id="text4728"><tspan sodipodi:role="line" id="tspan4726" - style="stroke-width:0.264583" + style="stroke-width:0.264583;fill:#ff0000;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="140.21178" y="53.450417">3 p[0]</tspan></text> <g @@ -4188,25 +4194,19 @@ </g> <text xml:space="preserve" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.93889px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-opacity:1" - x="211.33159" - y="135.88972" - id="text119606"><tspan + style="font-weight:bold;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583" + x="129.45743" + y="11.614304" + id="text136868"><tspan sodipodi:role="line" - id="tspan119604" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.93889px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-opacity:1" - x="211.33159" - y="135.88972">vide ! </tspan></text> - <text - xml:space="preserve" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.93889px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-opacity:1" - x="59.580173" - y="59.711948" - id="text119606-1"><tspan + id="tspan136866" + style="stroke-width:0.264583" + x="129.45743" + y="11.614304">le tube est vide.</tspan><tspan sodipodi:role="line" - id="tspan119604-9" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.93889px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-opacity:1" - x="59.580173" - y="59.711948">bloque ! </tspan></text> + style="stroke-width:0.264583" + x="129.45743" + y="17.78793" + id="tspan144095">read bloque donc le père</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/09-child-close.svg b/221018-pipe-example/fig/09-child-close.svg index 14a48ca4c212787cd903c5420040f73dd9b69bfa..bc605dad14c8f1cadccc3ed420dc85c31d57f03d 100644 --- a/221018-pipe-example/fig/09-child-close.svg +++ b/221018-pipe-example/fig/09-child-close.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.1523238" - inkscape:cx="359.70792" - inkscape:cy="421.32255" + inkscape:cx="360.57573" + inkscape:cy="422.19036" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -4084,7 +4084,7 @@ d="m 166.87657,142.08 h 31.08361 v -33.16707 h 6.43865" id="path80935" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 161.3556,146.79246 h 12.5336 v 24.49279 h 67.20842 v -26.99339 h -10.28438" id="path80937" /> <path @@ -4152,13 +4152,13 @@ y="143.19933">2 stderr</tspan></text> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583;fill:#ff0000" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583;fill:#ff0000;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="142.3044" y="147.98572" id="text4728-5"><tspan sodipodi:role="line" id="tspan4726-7" - style="stroke-width:0.264583;fill:#ff0000" + style="stroke-width:0.264583;fill:#ff0000;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="142.3044" y="147.98572">3 p[0]</tspan></text> <text diff --git a/221018-pipe-example/fig/11-child-dup2.svg b/221018-pipe-example/fig/11-child-dup2.svg index 3ceba350dbfc4d66ab4fc72188c4e279a1aff060..0ba974f79f4b544882cac723d5221891fc66e481 100644 --- a/221018-pipe-example/fig/11-child-dup2.svg +++ b/221018-pipe-example/fig/11-child-dup2.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.4666184" - inkscape:cx="443.1964" - inkscape:cy="461.94702" + inkscape:cx="444.21916" + inkscape:cy="462.62886" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -2092,13 +2092,13 @@ y="111.85227" /> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583;fill:#ff0000" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583;fill:#ff0000;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="94.883553" y="133.28987" id="text54908"><tspan sodipodi:role="line" id="tspan54906" - style="stroke-width:0.264583;fill:#ff0000" + style="stroke-width:0.264583;fill:#ff0000;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="94.883553" y="133.28987">pipe:[1137]</tspan></text> </g> @@ -4077,7 +4077,7 @@ d="m 165.47167,131.42037 h 27.57058 V 42.641205 h 10.0746" id="path80931" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 166.71704,136.72533 h 28.71969 V 71.029771 h 12.6199" id="path80933" /> <path @@ -4127,13 +4127,13 @@ y="132.63023">0 stdin</tspan></text> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583;fill:#ff0000" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583;fill:#ff0000;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="142.07907" y="137.91478" id="text4720-4"><tspan sodipodi:role="line" id="tspan4718-5" - style="stroke-width:0.264583;fill:#ff0000" + style="stroke-width:0.264583;fill:#ff0000;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="142.07907" y="137.91478">1 stdout</tspan></text> <text diff --git a/221018-pipe-example/fig/12-child-dup2-done.svg b/221018-pipe-example/fig/12-child-dup2-done.svg index 56c3b451c0780a3232999d8b24a42df04b3ad078..c87208006ef2a90db2d7db6d2b1649e35af9438b 100644 --- a/221018-pipe-example/fig/12-child-dup2-done.svg +++ b/221018-pipe-example/fig/12-child-dup2-done.svg @@ -25,12 +25,12 @@ inkscape:deskcolor="#d1d1d1" inkscape:document-units="mm" showgrid="false" - inkscape:zoom="1.4666184" - inkscape:cx="443.1964" - inkscape:cy="461.94702" + inkscape:zoom="1.0370558" + inkscape:cx="337.01175" + inkscape:cy="398.72492" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -2092,13 +2092,13 @@ y="111.85227" /> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583;fill:#ff0000" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583;fill:#ff0000;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="94.883553" y="133.28987" id="text54908"><tspan sodipodi:role="line" id="tspan54906" - style="stroke-width:0.264583;fill:#ff0000" + style="stroke-width:0.264583;fill:#ff0000;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="94.883553" y="133.28987">pipe:[1137]</tspan></text> </g> @@ -4077,7 +4077,7 @@ d="m 165.47167,131.42037 h 27.57058 V 42.641205 h 10.0746" id="path80931" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" d="m 166.71704,136.72533 h 28.71969 v 6.91204 l 6.95214,0" id="path80933" sodipodi:nodetypes="cccc" /> @@ -4128,13 +4128,13 @@ y="132.63023">0 stdin</tspan></text> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;fill:#ff0000;stroke-width:0.264583" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';fill:#ff0000;stroke-width:0.264583;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="142.07907" y="137.91478" id="text4720-4"><tspan sodipodi:role="line" id="tspan4718-5" - style="fill:#ff0000;stroke-width:0.264583" + style="fill:#ff0000;stroke-width:0.264583;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="142.07907" y="137.91478">1 stdout</tspan></text> <text @@ -4170,5 +4170,28 @@ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583" x="153.60347" y="164.19684">processus fils</tspan></text> + <text + xml:space="preserve" + style="font-weight:bold;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583" + x="129.44049" + y="171.1217" + id="text73542"><tspan + sodipodi:role="line" + id="tspan73540" + style="stroke-width:0.264583" + x="129.44049" + y="171.1217">dup2 <tspan + style="font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold Italic'" + id="tspan73544">écrase</tspan> le fd 1, pour qu'il pointe</tspan><tspan + sodipodi:role="line" + style="stroke-width:0.264583" + x="129.44049" + y="177.29533" + id="tspan73546">maintenant vers l'écriture dans le pipe</tspan><tspan + sodipodi:role="line" + style="stroke-width:0.264583" + x="129.44049" + y="183.46895" + id="tspan84143">(1 est fermé avant d'être écrasé)</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/14-child-exec.svg b/221018-pipe-example/fig/14-child-exec.svg index 7f9099f549073d1bc4ba1cbc9b8f3ca7e5257d85..311232471ebb6a8ea12ca07cb9ed20a34baa8987 100644 --- a/221018-pipe-example/fig/14-child-exec.svg +++ b/221018-pipe-example/fig/14-child-exec.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="0.9968396" - inkscape:cx="273.86552" - inkscape:cy="498.07411" + inkscape:cx="275.37028" + inkscape:cy="499.07728" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -4172,14 +4172,14 @@ y="164.19684">processus fils</tspan></text> <text xml:space="preserve" - style="font-style:normal;font-weight:normal;font-size:4.93889px;line-height:1.25;font-family:sans-serif;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.264583" - x="131.37462" - y="176.40404" + style="font-style:normal;font-weight:normal;font-size:4.93889px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583" + x="130.58521" + y="178.95015" id="text145051"><tspan sodipodi:role="line" id="tspan145049" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.93889px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.264583" - x="131.37462" - y="176.40404">fd préservés par exec</tspan></text> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.93889px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.264583" + x="130.58521" + y="178.95015">la table des fds est conservée par exec !</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/15-child-exec-done.svg b/221018-pipe-example/fig/15-child-exec-done.svg index d07bb0c3a0dd55d0f81aef6f780980de08b6c2b7..919444784080fe31cf15e2c965882077b37d90fe 100644 --- a/221018-pipe-example/fig/15-child-exec-done.svg +++ b/221018-pipe-example/fig/15-child-exec-done.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.0072646" - inkscape:cx="394.13676" - inkscape:cy="506.81818" + inkscape:cx="395.62594" + inkscape:cy="507.81096" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -2304,17 +2304,6 @@ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583" x="153.60347" y="164.19684">processus fils</tspan></text> - <text - xml:space="preserve" - style="font-style:normal;font-weight:normal;font-size:4.93889px;line-height:1.25;font-family:sans-serif;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.264583" - x="131.37462" - y="176.40404" - id="text145051"><tspan - sodipodi:role="line" - id="tspan145049" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.93889px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.264583" - x="131.37462" - y="176.40404">fd préservés par exec</tspan></text> <text xml:space="preserve" style="font-style:normal;font-weight:normal;font-size:4.93888889px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583" @@ -2337,5 +2326,16 @@ style="font-size:4.93889px;stroke-width:0.264583" x="17.387365" y="139.6445">echo est chargé en mémoire et exécuté</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:4.93889px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583" + x="130.58521" + y="178.95015" + id="text145051"><tspan + sodipodi:role="line" + id="tspan145049" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.93889px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.264583" + x="130.58521" + y="178.95015">la table des fds est conservée par exec !</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/16-parent-read-loop.svg b/221018-pipe-example/fig/16-parent-read-loop.svg index 0764d2c8cfc0d7d3dd575ea3d6a222d99ca82ff9..64b2213c09dca50b8688ec9123a43fa7c2c02e46 100644 --- a/221018-pipe-example/fig/16-parent-read-loop.svg +++ b/221018-pipe-example/fig/16-parent-read-loop.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.1350534" - inkscape:cx="411.43438" - inkscape:cy="363.41901" + inkscape:cx="381.92036" + inkscape:cy="324.65433" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -2089,20 +2089,20 @@ width="23.225805" height="15" preserveAspectRatio="none" - style="stroke-width:0.174978;image-rendering:optimizeSpeed;fill:#ff0000" + style="stroke-width:0.174978;image-rendering:optimizeSpeed;fill:#ff0000;stroke:#ff0000;stroke-opacity:1" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAfCAYAAACh+E5kAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9 kT1Iw0AcxV9bRSktFawg4pChOlkQFXHUKhShQqgVWnUwufQLmjQkKS6OgmvBwY/FqoOLs64OroIg +AHi6OSk6CIl/i8ptIjx4Lgf7+497t4B/kaFqWbXOKBqlpFOJoRsblXoeUUQYQygDxGJmfqcKKbg Ob7u4ePrXZxneZ/7c4SVvMkAn0A8y3TDIt4gnt60dM77xFFWkhTic+Ixgy5I/Mh12eU3zkWH/Twz amTS88RRYqHYwXIHs5KhEk8RxxRVo3x/1mWF8xZntVJjrXvyF4by2soy12kOI4lFLEGEABk1lFGB hTitGikm0rSf8PAPOX6RXDK5ymDkWEAVKiTHD/4Hv7s1C5MTblIoAXS/2PbHCNCzCzTrtv19bNvN EyDwDFxpbX+1Acx8kl5va7EjILINXFy3NXkPuNwBBp90yZAcKUDTXygA72f0TTmg/xYIrrm9tfZx +gBkqKvUDXBwCIwWKXvd4929nb39e6bV3w8q3nKKscjFLwAAAAZiS0dEAP8A/wD/oL2nkwAAAAlw SFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+YKDRUYGD+J89cAAAAZdEVYdENvbW1lbnQAQ3JlYXRl ZCB3aXRoIEdJTVBXgQ4XAAABiElEQVRYw+1Y20rEMBA9M826bP0U1wdB9MX/B19E3NX/8GEVL5nj Q9JuWyNNRTHFDZSQZJhhLuckHay0IoDcr7jhhIrN5nZU8Or8Eo8vT8U5oBTLEhSUOZxalSVIALUs CABCgamHUAEQFEKtQgiG9PZMfTxrqlBAsd6eUKM+aUOVa8OZ+uwMXN/dlFdCwev5Ds2tbpbrAGcN Yg0gmXEGpoC4SAem0OghAwca/c80inJLSOftwIFG//o5PSUD65P1fmGdtDCgKb6Ww1lEGCzO3Sh0 5VP6Jthw33pKMGGMiTMOzlLyKX0TbEgtjjt7G3XgWI+w86/llRAgmQVeJgrCTcwfTG+zlkEJ/ZKN AOIuoGwAsAaIEGzvt4XSqPXv5t66ZRGWS6Pbh/HILhfLmf+RFfricNmNLQIXp2dxYRBWYLxpBAJK 6OFQiCYoFIt71vZ6CEKgoHig6QO1+jplmmkjv7ElwDPeZc+olmBZi7Pv7PkEfPxnFvpK34gNDd2x GY9aXFZnegVXpKcfnHHpyinb6ZAAAAAASUVORK5CYII= " id="image50850" x="97.006233" y="111.85227" /> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583;fill:#000000" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.265;fill:#ff0000;stroke-dasharray:none;fill-opacity:1;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="94.883553" y="133.28987" id="text54908"><tspan sodipodi:role="line" id="tspan54906" - style="stroke-width:0.264583;fill:#000000" + style="stroke-width:0.265;fill:#ff0000;stroke-dasharray:none;fill-opacity:1;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="94.883553" y="133.28987">pipe:[1137]</tspan></text> </g> @@ -2112,7 +2112,7 @@ id="path52862" sodipodi:nodetypes="cccc" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 164.95174,41.699899 h 22.9205 v 27.123834 h 20.11199" id="path52911" /> <path @@ -2120,7 +2120,7 @@ d="m 164.76942,37.039298 h 38.48161" id="path52913" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 161.02013,52.048272 h 21.77513 v 75.725918 h 58.15801 v 12.77337 H 230.4018" id="path70938" sodipodi:nodetypes="cccccc" /> @@ -2174,13 +2174,13 @@ y="38.094936">0 stdin</tspan></text> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583;fill:#ff0000" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583;fill:#ff0000;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="139.98645" y="43.379482" id="text4720"><tspan sodipodi:role="line" id="tspan4718" - style="stroke-width:0.264583;fill:#ff0000" + style="stroke-width:0.264583;fill:#ff0000;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="139.98645" y="43.379482">1 stdout</tspan></text> <text @@ -2196,13 +2196,13 @@ y="48.664028">2 stderr</tspan></text> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583;fill:#ff0000" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583;fill:#ff0000;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="140.21178" y="53.450417" id="text4728"><tspan sodipodi:role="line" id="tspan4726" - style="stroke-width:0.264583;fill:#ff0000" + style="stroke-width:0.264583;fill:#ff0000;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="140.21178" y="53.450417">3 p[0]</tspan></text> <rect @@ -2217,7 +2217,7 @@ d="m 165.47167,131.42037 h 27.57058 V 42.641205 h 10.0746" id="path80931" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" d="m 166.71704,136.72533 h 28.71969 v 6.91204 l 6.95214,0" id="path80933" sodipodi:nodetypes="cccc" /> @@ -2268,13 +2268,13 @@ y="132.63023">0 stdin</tspan></text> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;fill:#ff0000;stroke-width:0.264583" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';fill:#ff0000;stroke-width:0.264583;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="142.07907" y="137.91478" id="text4720-4"><tspan sodipodi:role="line" id="tspan4718-5" - style="fill:#ff0000;stroke-width:0.264583" + style="fill:#ff0000;stroke-width:0.264583;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="142.07907" y="137.91478">1 stdout</tspan></text> <text @@ -2346,13 +2346,18 @@ <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583" - x="22.594851" - y="87.305748" + x="134.81325" + y="11.451879" id="text166698"><tspan sodipodi:role="line" id="tspan166696" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583" - x="22.594851" - y="87.305748">tout le contenu du pipe est affiché</tspan></text> + x="134.81325" + y="11.451879">tout le contenu du pipe est affiché</tspan><tspan + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583" + x="134.81325" + y="17.625504" + id="tspan153681">(caractère par caractère)</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/17-child-exit.svg b/221018-pipe-example/fig/17-child-exit.svg index 89d91ed401c939cea1d7565bdb0abdd9f1527dc5..c2a333885933c36f759d3d77a671d20222dc51e0 100644 --- a/221018-pipe-example/fig/17-child-exit.svg +++ b/221018-pipe-example/fig/17-child-exit.svg @@ -25,12 +25,12 @@ inkscape:deskcolor="#d1d1d1" inkscape:document-units="mm" showgrid="false" - inkscape:zoom="1.3209394" - inkscape:cx="378.89702" - inkscape:cy="351.64369" + inkscape:zoom="0.93404521" + inkscape:cx="358.11971" + inkscape:cy="413.79153" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -2213,20 +2213,20 @@ x="6.2269368" y="97.798691" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 165.47167,131.42037 h 27.57058 V 42.641205 h 10.0746" id="path80931" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" d="m 166.71704,136.72533 h 28.71969 v 6.91204 l 6.95214,0" id="path80933" sodipodi:nodetypes="cccc" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 166.87657,142.08 h 31.08361 v -33.16707 h 6.43865" id="path80935" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 161.99024,152.34976 h 25.54065 v -6.69074 h 15.01428" id="path80939" /> <g @@ -2303,13 +2303,13 @@ y="153.27026">4 </tspan></text> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;text-align:center;text-anchor:middle;stroke-width:0.264583;fill:#ff0000" + style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583;fill:#ff0000;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="153.60347" y="164.19684" id="text6972-1"><tspan sodipodi:role="line" id="tspan6970-9" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583;fill:#ff0000" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583;fill:#ff0000" x="153.60347" y="164.19684">processus fils</tspan></text> </g> @@ -2357,5 +2357,21 @@ style="stroke-width:0.264583" x="17.387365" y="153.69962">echo termine</tspan></text> + <text + xml:space="preserve" + style="font-weight:bold;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583" + x="129.16823" + y="176.23912" + id="text113863"><tspan + sodipodi:role="line" + id="tspan113861" + style="stroke-width:0.264583" + x="129.16823" + y="176.23912">terminaison du processus fils.</tspan><tspan + sodipodi:role="line" + style="stroke-width:0.264583" + x="129.16823" + y="182.41275" + id="tspan113865">sa table des fds est nettoyée</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/18-child-exit-done.svg b/221018-pipe-example/fig/18-child-exit-done.svg index d9936f788f2ca5ac966737a2702cc95646ec4883..f3ff75d454f752b010c1c05ca1e527f0c0da4a95 100644 --- a/221018-pipe-example/fig/18-child-exit-done.svg +++ b/221018-pipe-example/fig/18-child-exit-done.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.0261534" - inkscape:cx="491.15462" - inkscape:cy="362.03163" + inkscape:cx="384.44544" + inkscape:cy="373.7258" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -1452,7 +1452,8 @@ id="text3066"><tspan x="0" y="0" - id="tspan3064">r</tspan></text> + id="tspan3064" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">r</tspan></text> <text xml:space="preserve" transform="translate(111.83923,13)" @@ -1460,7 +1461,8 @@ id="text3070"><tspan x="0" y="0" - id="tspan3068">e</tspan></text> + id="tspan3068" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">e</tspan></text> <text xml:space="preserve" transform="translate(119.78565,13)" @@ -1468,7 +1470,8 @@ id="text3074"><tspan x="0" y="0" - id="tspan3072">a</tspan></text> + id="tspan3072" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">a</tspan></text> <text xml:space="preserve" transform="translate(127.73206,13)" @@ -1476,7 +1479,8 @@ id="text3078"><tspan x="0" y="0" - id="tspan3076">d</tspan></text> + id="tspan3076" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">d</tspan></text> <text xml:space="preserve" transform="translate(135.67847,13)" @@ -1484,7 +1488,8 @@ id="text3082"><tspan x="0" y="0" - id="tspan3080">(</tspan></text> + id="tspan3080" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">(</tspan></text> <text xml:space="preserve" transform="translate(143.62488,13)" @@ -1652,7 +1657,8 @@ id="text3166"><tspan x="0" y="0" - id="tspan3164">)</tspan></text> + id="tspan3164" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';fill:#ff0000">)</tspan></text> <text xml:space="preserve" transform="translate(336,13)" @@ -2258,25 +2264,19 @@ y="153.69962">echo termine</tspan></text> <text xml:space="preserve" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.264583" - x="163.83502" - y="133.8098" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.264583" + x="125.92122" + y="168.80058" id="text172306"><tspan sodipodi:role="line" id="tspan172304" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.264583" - x="163.83502" - y="133.8098">plus d'entrée ouverte !</tspan></text> - <text - xml:space="preserve" - style="font-size:4.9389px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583;fill:#ff0000;-inkscape-font-specification:'sans-serif Bold';font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" - x="45.712601" - y="88.301353" - id="text181412"><tspan + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.264583" + x="125.92122" + y="168.80058">il n'y a plus aucune référence vers l'écriture</tspan><tspan sodipodi:role="line" - id="tspan181410" - style="stroke-width:0.264583;fill:#ff0000;-inkscape-font-specification:'sans-serif Bold';font-family:sans-serif;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" - x="45.712601" - y="88.301353">read renvoie 0</tspan></text> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.264583" + x="125.92122" + y="174.97421" + id="tspan117161">dans le pipe. donc read renvoie 0 (EOF)</tspan></text> </g> </svg> diff --git a/221018-pipe-example/fig/19-parent-close.svg b/221018-pipe-example/fig/19-parent-close.svg index c60f16c7b96c50a3d43bc80ca2712b72f1e74dec..2e42c78c849d4a0bfbd6ae404c4589bec3f8749a 100644 --- a/221018-pipe-example/fig/19-parent-close.svg +++ b/221018-pipe-example/fig/19-parent-close.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.0261534" - inkscape:cx="475.56241" - inkscape:cy="354.23552" + inkscape:cx="477.0242" + inkscape:cy="355.21005" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -2114,7 +2114,7 @@ d="m 164.76942,37.039298 h 38.48161" id="path52913" /> <path - style="fill:none;stroke:#ff0000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-dasharray:none" d="m 161.02013,52.048272 h 21.77513 v 75.725918 h 58.15801 v 12.77337 H 230.4018" id="path70938" sodipodi:nodetypes="cccccc" /> @@ -2190,13 +2190,13 @@ y="48.664028">2 stderr</tspan></text> <text xml:space="preserve" - style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583;fill:#ff0000" + style="font-size:4.23333px;line-height:1.25;font-family:monospace;-inkscape-font-specification:'monospace Bold';stroke-width:0.264583;fill:#ff0000;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="140.21178" y="53.450417" id="text4728"><tspan sodipodi:role="line" id="tspan4726" - style="stroke-width:0.264583;fill:#ff0000" + style="stroke-width:0.264583;fill:#ff0000;-inkscape-font-specification:'monospace Bold';font-family:monospace;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal" x="140.21178" y="53.450417">3 p[0]</tspan></text> <rect diff --git a/221018-pipe-example/fig/20-parent-close-done.svg b/221018-pipe-example/fig/20-parent-close-done.svg index 0a7655664feee12209d3ffe77da939f178cac379..2117ffd6c4e30abf2d4dd9c04b34529f9f66a0e2 100644 --- a/221018-pipe-example/fig/20-parent-close-done.svg +++ b/221018-pipe-example/fig/20-parent-close-done.svg @@ -26,11 +26,11 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.0261534" - inkscape:cx="475.56241" - inkscape:cy="354.23552" + inkscape:cx="477.0242" + inkscape:cy="355.21005" inkscape:window-width="1916" inkscape:window-height="1032" - inkscape:window-x="0" + inkscape:window-x="1920" inkscape:window-y="22" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -2236,19 +2236,19 @@ y="153.69962">echo termine</tspan></text> <text xml:space="preserve" - style="font-size:4.9389px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583;-inkscape-font-specification:'sans-serif Bold';font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal;fill:#ff0000" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.9389px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.264583" x="139.5511" - y="165.02856" + y="170.14188" id="text185090"><tspan sodipodi:role="line" id="tspan185088" - style="stroke-width:0.264583;-inkscape-font-specification:'sans-serif Bold';font-family:sans-serif;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal;fill:#ff0000" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.264583" x="139.5511" - y="165.02856">plus aucune référence vers le pipe,</tspan><tspan + y="170.14188">plus aucune référence vers le pipe.</tspan><tspan sodipodi:role="line" - style="stroke-width:0.264583;-inkscape-font-specification:'sans-serif Bold';font-family:sans-serif;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal;fill:#ff0000" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.264583" x="139.5511" - y="171.20219" - id="tspan185092">le système peut le supprimer</tspan></text> + y="176.31551" + id="tspan185092">le système est libre de le supprimer</tspan></text> </g> </svg>