I use win10 if it's matters, in bash(git)
I have SH script:
start node ./e2e-tests/apimocker_runner.js & pid1=$!
start npm run protractor -- --binaryPath=./build/appInstaller/win-unpacked/ & pid2=$!
sleep 10
kill $pid1
kill $pid2
when i try kill processes by pid i have error:
bash: kill: (6616) - No such process
As i know in $!
we have last child process pid, but this don't work.
Cuz then i type in bash:
start bash & pid=$!
echo $pid
$pid === 1000 (for example)
but if i type
echo $$
in created bash by previous command i have another pid
$$ ==== 1200 (for example)
Also I found what if i type start bash
this create non-child process, but i want to create child process and wait for them like wait $pid
How i can do this?