Apr 16, 2024Apr 16, 2024 · 1 min read · 23 viewsShell: wait, kill, trap 組合筆記Story 有一個 python 的 single process script ,要模擬 multiprocess 情境,但又希望只用 shell script 觸發: 同時跑起好幾個 process 使用者輸入 Ctrl-C 就中斷所有 process 要等到所有 process 都關掉才會結束 shell script import time def main(): while 1 min read · 23 views