help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] get pid of exited process


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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]