File:Termios-script-diagram.svg

Original file (SVG file, nominally 924 × 780 pixels, file size: 6 KB)

Summary

Description
English: Diagram of script(1) using Unix98 pseudo terminals (e.g. on Linux)
Date
Source Own work
Author Krishnavedala
SVG development
InfoField
 
The SVG code is valid.
 
This vector image was created with dvisvgm 1.14 by Krishnavedala.
 
 This file uses embedded text that can be easily translated using a text editor.
Source code
InfoField

SVG code

LaTeX
\documentclass[12pt]{standalone} \usepackage{times} \usepackage{pgf,tikz} \usetikzlibrary{arrows,shapes,patterns,fit}  \begin{document} \begin{tikzpicture}[thick,>={Stealth[width=2mm,length=3mm]},every node/.style={fill=none,font=\scriptsize}, 	box/.style={draw,rectangle, text width=#1, text centered,minimum height=1cm,font=\small}, 	box/.default=2.5cm, 	ell/.style={ellipse, text width=#1, text centered,minimum height=1cm,font=\small}, 	ell2/.style={ellipse, text width=#1, text centered,minimum height=1cm}, 	] 	\node[box] 		at (0,0) 				(script)	{\textit{script} }; 	\node[box] 		at ($(script)+(6,0)$) 	(bash)		{\textit{bash} }; 	\node[box=2cm] 	at ($(script)-(1,4)$)	(term)		{Terminal}; 	\node[box] 		at ($(term)+(3,0)$)		(pseudomas)	{Pseudo terminal master}; 	\node[box=3cm] 	at ($(pseudomas)+(4,0)$)	(pseudosla)	{Pseudo terminal slave\\\texttt{(/dev/pts/\ldots)} }; 	\node[ell=2cm,draw] at ($(term)+(.5,-2.5)$)	(user) 	{User}; 	\node[text width=5cm,font=\small] 	at ($(script)+(3.5,2)$)	(write) 	{Write to file (transcript)}; 	\node[draw,very thick,fit={($(script)+(0,1)$) (term) (pseudosla)}, inner sep=.5cm] (f) {}; 	\draw[->,dashed] (script) -- node[below] {\textit{fork()} } (bash); 	\draw[dashed,very thick] (f.west) -- node[below,pos=.9] {\textit{Kernel space} }(f.east); 	\node[anchor=north west,font=\small] at (f.north west) {\textit{User space} }; 	\draw[<->] (pseudomas) -- (pseudosla); 	\draw[->,dotted] (script.40) .. controls ++(-1.5,.2) and ++(-1,-.2) .. (write.west); 	\draw[->] (term.135) -- node[left,pos=.85] {stdin} (script.-145); 	\draw[<-] (term.120) -- node[right,pos=.15,ell2=.5cm] {stdout\\stderr} (script.-135); 	\draw[->] (pseudomas.145) -- node[left,pos=.7] {\textit{read()} } (script.-55); 	\draw[<-] (pseudomas.130) -- node[right,pos=.3] {\textit{write()} } (script.-40); 	\draw[->] (pseudosla.145) -- node[left,pos=.7] {stdin()} (bash.-145); 	\draw[<-] (pseudosla.135) -- node[right,pos=.15,ell2=.5cm] {stdout\\stderr} (bash.-130); 	\draw[<->] (term) -- node[right,pos=.3] {keyboard input} node[left,pos=.7] {terminal output} (user); \end{tikzpicture} \end{document} 

Licensing

Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

9 May 2016

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current02:06, 10 May 2016Thumbnail for version as of 02:06, 10 May 2016924 × 780 (6 KB)KrishnavedalaUser created page with UploadWizard

The following page uses this file:

Global file usage

The following other wikis use this file:

Metadata