diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-02-25 15:18:18 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-02-25 15:18:18 +0100 |
| commit | 6174aa76ee061818a8ca6b0d952e90257ca3b5d4 (patch) | |
| tree | 1cd02e5c474f2887fe62178b8720275bc189ea41 /src/blog/2023-02-25-job-control/jobs-diagram.tex | |
| parent | d0221b3325c5e0b206d744d1ffcae0fbcb96ec2a (diff) | |
| download | sebastiano.tronto.net-6174aa76ee061818a8ca6b0d952e90257ca3b5d4.tar.gz sebastiano.tronto.net-6174aa76ee061818a8ca6b0d952e90257ca3b5d4.zip | |
Added blog post
Diffstat (limited to 'src/blog/2023-02-25-job-control/jobs-diagram.tex')
| -rw-r--r-- | src/blog/2023-02-25-job-control/jobs-diagram.tex | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/blog/2023-02-25-job-control/jobs-diagram.tex b/src/blog/2023-02-25-job-control/jobs-diagram.tex new file mode 100644 index 0000000..0a919db --- /dev/null +++ b/src/blog/2023-02-25-job-control/jobs-diagram.tex | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | \documentclass[crop, tikz]{standalone} | ||
| 2 | \usepackage{tikz} | ||
| 3 | |||
| 4 | \begin{document} | ||
| 5 | \begin{tikzpicture} | ||
| 6 | \usetikzlibrary{arrows.meta} | ||
| 7 | |||
| 8 | % Just a workaround to leave some space around the diagram | ||
| 9 | \filldraw[color=white,fill=white] (-8,-9) rectangle (8,1); | ||
| 10 | |||
| 11 | % Boxes | ||
| 12 | \newcommand{\tbox}[3]{ | ||
| 13 | \node[draw, rounded corners, text centered, text width=3cm] | ||
| 14 | (#1) at (#2) {\bf #3} | ||
| 15 | ; | ||
| 16 | } | ||
| 17 | \tbox {top} {0,0} {Job not running} | ||
| 18 | \tbox {left} {-6,-4} {Job running in the background} | ||
| 19 | \tbox {right} {6,-4} {Job running in the foreground} | ||
| 20 | \tbox {bottom} {0,-8} {Job suspended} | ||
| 21 | |||
| 22 | % Arrows | ||
| 23 | \newcommand{\arr}[4]{ | ||
| 24 | \draw[-{Latex[length=3mm]}, ultra thick] | ||
| 25 | (#1) edge[#4] node[fill=white] {\texttt{#3}} (#2) | ||
| 26 | ; | ||
| 27 | } | ||
| 28 | \arr {top} {left} {command \&} {bend right} | ||
| 29 | \arr {left} {top} {kill \%job} {bend right} | ||
| 30 | \arr {left} {bottom} {kill -STOP \%job} {bend right} | ||
| 31 | \arr {bottom} {left} {bg \%job} {bend right} | ||
| 32 | \arr {bottom} {right} {fg \%job} {bend left} | ||
| 33 | \arr {right} {bottom} {Ctrl+Z} {bend left} | ||
| 34 | \arr {right} {top} {Ctrl+C} {bend left} | ||
| 35 | \arr {top} {right} {command} {bend left} | ||
| 36 | \arr {left} {right} {fg \%job} {} | ||
| 37 | \end{tikzpicture} | ||
| 38 | \end{document} | ||
