FG
💻 Software

execute command after process terminates in different shell

Fresh7 days ago
Mar 15, 20267262 views
Confidence Score0%
0%

Problem

I am running a command that's processing some data in one shell window (let's say it has pid 200). Unfortunately I forgot to add the & to run it in the background. I need to run some analysis script after pid 200 is finished. I thought I could just open up another shell window and do But it complai…

Error Output

wait 200; ./myanalysis.sh

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: execute command after process terminates in different shell

Low Risk

You can't "wait" for non-child processes, and you have to manually check it periodically. See for example this stack overflow answer.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment