Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • @DanielKaplan Try e.g. p=$(bash -c 'sleep 2 >/dev/null & echo $!'); sleep 1; ps -f -p "$p" to see that sleep 2 command is still running after bash has exited. Commented Dec 23, 2022 at 12:57
  • @DanielKaplan The sleep 2 command is running in background as a separate process; its command ends with &. Commented Jan 1, 2023 at 12:22
  • @jarno Apologies. I was incorrect about my first comment so I've deleted my others. Commented Jan 1, 2023 at 23:29