A question about the PID of a background function

Dear all,

I'm writing a KornShell script that calls inside it a function in background mode

#!/bin/ksh

function myfunction
{ . . .}

myfunction |&
. . .

How can I capture the PID of the function myfunction that runs in background?

Thanks in advance
:slight_smile:

#!/bin/ksh

myfunction |&

echo $!

Thanks a lot, it works pretty well now

Regards,
:smiley: