|
From: | Stas Sergeev |
Subject: | [Help-bash] get pid of exited process |
Date: | Sat, 2 Jan 2016 15:30:44 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Hi. Is there some (probably bash-specific) way of getting the PID of an exited foreground process? The only work-around I could do, was: set -m my_app & PID=$! fg >/dev/null ... but this is a bit too much and unportable (needs "set -m"). Any simpler way?
[Prev in Thread] | Current Thread | [Next in Thread] |