File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 450
450
\end{minted}
451
451
\end{leftemize}
452
452
\end{frame}
453
+
454
+ \begin{frame}[fragile]{Detaching Jobs}
455
+ \vspace*{-0.5ex}
456
+ \alert<1>{When you launch jobs with an \texttt{\&} and then close your terminal, those jobs will \emph{end}.}
457
+ \vspace*{-0.5ex}
458
+ \begin{block}{\colbf{No H}ang\colbf{up}}
459
+ \texttt{nohup <command> [args]}
460
+ \begin{enumerate}[\--]
461
+ \item Launches \texttt{command} so it will not end with \texttt{SIGHUP} signals.
462
+ \item E.g. {\footnotesize\texttt{nohup vlc best\_song\_ever.flac > /dev/null 2>\&1 \&}}
463
+ \begin{enumerate}[\--]
464
+ \item Now we do not lose \texttt{vlc} when we close our terminal.
465
+ \end{enumerate}
466
+ \end{enumerate}
467
+ \end{block}
468
+ \vspace*{-1ex}
469
+ \pause
470
+ \alert<2>{If you have already launched the job, you can still save it.}
471
+ \begin{block}{\colbf{Disown} a Job}
472
+ \texttt{disown [flags] jobspec}
473
+ \begin{enumerate}[\--]
474
+ \item The \texttt{-h} flag prevents \texttt{jobspec} from \texttt{SIGHUP} killing it.
475
+ \item The \texttt{jobspec} is the job number (e.g. run \texttt{jobs}).
476
+ \item E.g. if \texttt{jobID} 1 is \texttt{vlc}, then \texttt{disown -h \%1} will work.
477
+ \end{enumerate}
478
+ \end{block}
479
+ \end{frame}
453
480
%%%%%
454
481
%%%%%
455
482
%%%%%
You can’t perform that action at this time.
0 commit comments