[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] Use pid of cmd run in sub shell in parent shell?
From: |
Patrick Schleizer |
Subject: |
[Help-bash] Use pid of cmd run in sub shell in parent shell? |
Date: |
Thu, 01 May 2014 19:46:29 +0000 |
Hi!
The following works well. Except that I have no idea how to get the pid
of long_running_cmd_here outside the subshell. Any idea?
=====
while read line; do
log "...: $line"
done < <(
{
long_running_cmd_here
}
) &
echo "Need pid of long_running_cmd_here here."
=====
I need the pid of long_running_cmd_here for job control, so I can send
signals to long_running_cmd_here.
Cheers,
Patrick
- [Help-bash] Use pid of cmd run in sub shell in parent shell?,
Patrick Schleizer <=