\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Cesarblancg} \pdfinfo{ /Title (soper1.pdf) /Creator (Cheatography) /Author (Cesarblancg) /Subject (SOPER1 Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{SOPER1 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Cesarblancg} via \textcolor{DarkBackground}{\uline{cheatography.com/54996/cs/18694/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Cesarblancg \\ \uline{cheatography.com/cesarblancg} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 1st February, 2019.\\ Updated 1st February, 2019.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{p{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Fork}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Permite crear un proceso hijo.} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Padre: & PID del hijo \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Hijo: & 0 \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Error: & -1 \tn % Row Count 4 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{exec}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Pone en ejecución un programa. No cambia la identidad del proceso.} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} execlp & argumentos en lista \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} execvp & argumentos en vector a punteros (argv{[}{]}) \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{~~~~~~~~~~~~~~~~~~~~~~~~~~~{\bf{herencia}}} \tn % Row Count 9 (+ 4) % Row 4 \SetRowColor{LightBackground} PID,PPID,PGID,UID GID & variables de entorno \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} señales pendientes & tabla de descriptores \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{~~~~~~~~~~~~~~~~~~~~~~~~~~~{\bf{Diferente}}} \tn % Row Count 17 (+ 4) % Row 7 \SetRowColor{white} EUID,EGID & comportamiento ante señales \tn % Row Count 19 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} p{0.4977 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{execlp}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{execlp(comando,comando,argumento1,....,0)} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{Comando dos veces} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} p{0.4977 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{execvp}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{execvp(argv{[}1{]},\&argv{[}1{]})} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} p{0.4977 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{strtok(s,"\_")}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{La primera vez devuelve el puntero donde empieza la primera palabra y escribe un \textbackslash{}0 donde acaba} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{Siguientes veces usar null en vez de s.} \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.14471 cm} x{3.83229 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{wait // waitpid(pid\_hijo,p\_estado,options)}} \tn % Row 0 \SetRowColor{LightBackground} error & -1 (si no hay hijos) // errno =10 \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{~~~~~~~~~~~~~~~~~~~~~~~~~~~{\bf{Terminación}}} \tn % Row Count 6 (+ 4) % Row 2 \SetRowColor{LightBackground} \seqsplit{voluntaria} & byte + significativo \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{~~~~~~~~~~~~~~~~~~~~~~~~~~~{\bf{proceso zombie}}} \tn % Row Count 12 (+ 4) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Cuando el padre no ha hecho wait} \tn % Row Count 13 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{~~~~~~~~~~~~~~~~~~~~~~~~~~~{\bf{proceso huérfano}}} \tn % Row Count 17 (+ 4) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Cuando el padre se cierra dejando hijios activos. Son adoptados por el init(pid=1)} \tn % Row Count 19 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.34379 cm} x{3.63321 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Signal(señal,comportamiento)}} \tn % Row 0 \SetRowColor{LightBackground} Señal: & Nombre o número \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{comportamiento:} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} SIG\_DFL & 0 \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} SIG\_IGN & 1 \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{rutina\_captura} \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} & puntero a función de parametro entero que devuelve void \tn % Row Count 7 (+ 2) % Row 6 \SetRowColor{LightBackground} Devuelve: & Comportamiento anterior \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} Capturar señal & Solo una vez \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\#define SIG\_ERR(void(*)(int))-1} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.69678 cm} x{4.28022 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{kill(pid\_señalado,señal)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{~~~~~~~~~~~~~~~~~~~~~~~~~{\bf{pid\_señalado}}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \textgreater{}0 & pid destino \tn % Row Count 5 (+ 1) % Row 2 \SetRowColor{LightBackground} =0 & todos los del grupo \tn % Row Count 6 (+ 1) % Row 3 \SetRowColor{white} =-1 & Todos los procesos(SU) \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} \textless{}-1 & grupo de procesos con valor absoluto \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{~~~~~~~~~~~~~~~~~~~~~~~~~{\bf{matar a todos}}} \tn % Row Count 13 (+ 4) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{kill -9 -1} \tn % Row Count 14 (+ 1) % Row 7 \SetRowColor{white} \seqsplit{error:} & -1 \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{alarm(sec)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Programa la recepción de sIG\_ALARM dentro de sec segundos} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{alarm(0)} & Cancela la alarma que haya (Solo puede haber una) \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{devuelve:} & tiempo de la anterior alarma \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Recuerda capturar antes de hacer alarm} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} p{0.4977 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{pause()}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Suspende al proceso hasta la llegada de una señal capturada.} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{devuelve -1 al capturar señal} \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.84609 cm} x{4.13091 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Señales seguras}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{sigset\_t} & sigemptyset (todo vacío) \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & sigfillset(todo lleno \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} & sigaddset(añadir) \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} & sigdelset(borrar) \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} & sigismember(sigset\_t,int signo) \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{int sigprocmask(int how, sigset\_t{\emph{ set,sigset\_t}} oset)} \tn % Row Count 8 (+ 2) % Row 6 \SetRowColor{LightBackground} how & SIG\_BLOCK //añade set al conjunto \tn % Row Count 10 (+ 2) % Row 7 \SetRowColor{white} & SIG\_UNBLOCK // quita set al conjunto \tn % Row Count 12 (+ 2) % Row 8 \SetRowColor{LightBackground} & SIG\_SETMASK // pone nuevo set como conjunto \tn % Row Count 14 (+ 2) % Row 9 \SetRowColor{white} oset & devuelve el conjunto previo de señales \tn % Row Count 16 (+ 2) % Row 10 \SetRowColor{LightBackground} set & devuelve el nuevo \tn % Row Count 17 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{int \seqsplit{sigpending(sigset\_t*set)}} \tn % Row Count 18 (+ 1) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{int sigsuspend(sigset\_t* sigmask)} \tn % Row Count 19 (+ 1) % Row 13 \SetRowColor{white} & operacion atomica para resolver problemas de sincro. \tn % Row Count 21 (+ 2) % Row 14 \SetRowColor{LightBackground} & bloqueo sigusr1 \tn % Row Count 22 (+ 1) % Row 15 \SetRowColor{white} & kill( , sigusr1) \tn % Row Count 23 (+ 1) % Row 16 \SetRowColor{LightBackground} & sigsuspend(desbloqueo) \tn % Row Count 24 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.53827 cm} x{2.43873 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Identificadores}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{~~~~~~~~~~~~~~~~~~~~~~~~~~~{\bf{Usuario}}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} UID: & id de usuario(0 para su) \tn % Row Count 6 (+ 2) % Row 2 \SetRowColor{LightBackground} GID: & id del grupo \tn % Row Count 7 (+ 1) % Row 3 \SetRowColor{white} ~~~~~~~~~~~~~~~~~~~~~~~~~~~{\bf{Fichero}} & número de inodo \tn % Row Count 16 (+ 9) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{i-nodo} \tn % Row Count 17 (+ 1) % Row 5 \SetRowColor{white} UID: & propietario \tn % Row Count 18 (+ 1) % Row 6 \SetRowColor{LightBackground} GUID: & grupo propietario \tn % Row Count 19 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{permisos de acceso(user-group-other)} \tn % Row Count 20 (+ 1) % Row 8 \SetRowColor{LightBackground} set-user-id & usuario efectivo \tn % Row Count 21 (+ 1) % Row 9 \SetRowColor{white} set-group-id & grupo efectivo \tn % Row Count 22 (+ 1) % Row 10 \SetRowColor{LightBackground} sticky bit & gestión en directorio compartido(\textbackslash{}tmp) \tn % Row Count 25 (+ 3) % Row 11 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{~~~~~~~~~~~~~~~~~~~~~~~~~~~{\bf{Proceso}}} \tn % Row Count 29 (+ 4) % Row 12 \SetRowColor{LightBackground} PID & pid\_t getpid() //id padre \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.53827 cm} x{2.43873 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Identificadores (cont)}} \tn % Row 13 \SetRowColor{LightBackground} PGID & pid\_t getpgrp() //id del grupo \tn % Row Count 2 (+ 2) % Row 14 \SetRowColor{white} UID & uid\_t getuid() // usuario real \tn % Row Count 4 (+ 2) % Row 15 \SetRowColor{LightBackground} GID & gid\_t getgid() // id del grupo usuario \tn % Row Count 6 (+ 2) % Row 16 \SetRowColor{white} EUID & uid\_t geteuid() //usuario efectivo \tn % Row Count 8 (+ 2) % Row 17 \SetRowColor{LightBackground} & si(set-user-id==1) then EUID=UID \tn % Row Count 10 (+ 2) % Row 18 \SetRowColor{white} EGID & gid\_t getegid // grupo efectivo \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.43413 cm} p{1.54287 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Señales}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Por defecto termina el programa} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{ctrl+c o ctrl+y no se pueden controlar} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Terminación proceso hijo no se puede capturar} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} SIGINT & 2 \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} SIGQUIT & 3 \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} SIGPIPE & 13 \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} SIGALRM & 14 \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} SIGTERM & 15 \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} SIGUSR{[}1,2{]} & 16,17 \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} SIGCHLD & 18 \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} SIGSTOP & 23 \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} SIGCONT & 25 \tn % Row Count 12 (+ 1) % Row 12 \SetRowColor{LightBackground} SIGSEGV & 11 \tn % Row Count 13 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Llamadas sistema}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{int creat(char*path,mode\_t mode)}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} & Crea un fichero o reescribe uno existente. Abierto solo para escritura. Si el fichero existe pierdes los datos. \tn % Row Count 5 (+ 4) % Row 2 \SetRowColor{LightBackground} & Devuelve Descriptor de fichero o -1 \tn % Row Count 6 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\bf{int open(char*path,int oflag, {[}mode{]})}}} \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} & Permite abrir un archivo como lectura, escritura o ambas \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{[}oflag{]}} \tn % Row Count 10 (+ 1) % Row 6 \SetRowColor{LightBackground} & O\_RDONLY 0 \tn % Row Count 11 (+ 1) % Row 7 \SetRowColor{white} & O\_WRONLY 1 \tn % Row Count 12 (+ 1) % Row 8 \SetRowColor{LightBackground} & O\_RDWR 2 \tn % Row Count 13 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{[}mode{]}} \tn % Row Count 14 (+ 1) % Row 10 \SetRowColor{LightBackground} & O\_APPEND(cursor al final) \tn % Row Count 15 (+ 1) % Row 11 \SetRowColor{white} & O\_CREAT(crea fichero) \tn % Row Count 16 (+ 1) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{int close( int fd)}}} \tn % Row Count 17 (+ 1) % Row 13 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{Elimina la entrada TDF y TFA y decrementa nºopens en TI} \tn % Row Count 19 (+ 2) % Row 14 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Devuelve 0 o -1} \tn % Row Count 20 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}