multithreading - BASH: Run two commands in parallel and wait for the second one to finish -


i have 2 commands, 1 logging things in background , won't stop until kill , second 1 stop.

let's mark them , b respectively.

i want execute:

  • a , b in parallel
  • wait b finish
  • kill a
  • [do more stuff]

and repeat in loop.

i'm running on macos , can't update bash 4.x because of gplv3.

preferably (the logger) start first wouldn't mind if it's undefined or b start first since difference in time negligible.

help appreciated.

thanks


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -