You are not logged in.
I have script that does some stuff but the key part is starting a series worker scripts it created like this:
#!/bin/bash
...
mapfile -t workers < <(find workers -name '*.sh' -printf "%f\n" | sort)
for i in "${workers[@]}"; do
nohup workers/"$i" > "nohup.$i.log" &
done
Since the nohup was executed in the script, running jobs -l on the shell I used to run the script gives no results. I am looking for some ideas to see the status of the worker scripts, are they running, finished, errored, etc?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Isn't the trailing '&' somehow defeating the purpose of 'nohup'?
Offline
https://unix.stackexchange.com/question … disown-and
Do you expect the master script to terminate before the jobs?
If not you could trap SIGUSR1 and make that print "jobs -l"
If yes, you could wait for all jobs before you terminate the script?
https://stackoverflow.com/questions/356 … xit-code-0
Online