This is currently Hurd-specific but could be made Mach-generic as long as the equivalent of pid2task() is available.