~/ learn/ comp-325/ cards/ A descriptor is a slot you can rebind
1 of 10

Role one: replace the shell, or only a subshell

Role one: replace the shell, or only a subshell

Answer

exec date ( exec date ) echo still here

The first line ends the shell that runs it. Inside parentheses only the subshell is overlaid, so the third line still runs — which is why you can test this at all.

S&K 3e ch13 §13.5; descriptor forms and exec from POSIX.1-2024 §2.7, §2.14

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/76389578-61e2-40a6-8e41-606a62a4d097/flashcard utf-8 LF