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*

5
  • Sorry but I fail to understand how the termination of one process would consequently trigger the termination of others of the same unit. Commented Jan 21, 2024 at 16:33
  • I meant to say add a wait -n, not just a wait. This wait will return when any background process exits. This makes the script finish, and systemd kills the other processes in the control group as the unit stops. Commented Jan 21, 2024 at 17:02
  • @meuh - sorry, but I am not using systemd. I am using sysvinit. I did not specify this in my question, because I did not anticipate it would be relevant. Commented Jan 21, 2024 at 17:18
  • @meuh… is'nt wait -n exclusively bash ? (When apparently OP's scripts is sh ?) Commented Jan 21, 2024 at 17:19
  • @MC68020 yes, wait -n is not in all shells, but some systems link sh to bash and that accepts wait -n, and otherwise bash is often available in distributions. Commented Jan 21, 2024 at 18:00