0
Ist es möglich, PID der Funktion im Hintergrund von der Funktion selbst ausgeführt zu bekommen?Get PID der Funktion im Hintergrund ausgeführt
#!/bin/bash
Foo()
{
echo PId=$$ #I want pid of process that executed the function!
}
echo Main PID=$$
Foo & #execute function in background
echo SUBPID=$! #get the pid of last executed background process, in this case Foo
wait