I have a script that has many sequential steps to perform, some of which are written into some child scripts. The child scripts run in sequence only.
- Is there a way to halt an already running parent process/script that is waiting for exit status of child script?
- Is there a way to execute a script with ppid of the parent process/script?
- Is there a way to then pass the exit status of a child script to the already running yet waiting parent script?
Suppose a child process/script has become defunct or it is going to perform some steps that need modification. so i can run the modified child script in background, halt the parent script and then i can kill the original child script and continue parent script whilst passing the success code to the parent. I intend to do the above procedure after the parent script has already started its execution.
If i kill the child script, the parent fails. Thus either i have to edit the parent script and rerun, or perform all the steps of the parent again after undoing the processing done earlier by parent. Its a lot time consuming.
read
command (see https://unix.stackexchange.com/q/134437/173368). Then you do the intermediate tasks in however way you see fit. Once done, go back to original script and let it resume and run to completion. – Haxiel Jul 25 '20 at 11:23