my $handle; my $thispid = Win32::Process::GetCurrentProcessID(); # differs from $$ under cygwin Win32::Process::Open($handle, $thispid, 1);