Fixes <https://bugs.gnu.org/34716>.
Reported by Mark H Weaver <mhw@netris.org>.
The problem could be reproduced by running, on one hand:
sh -c 'exec -a guix-daemon sleep 777'
and on the other hand:
guix processes
If there is no process with PID 777, 'guix processes' would barf as it
stumbles upon a <daemon-session> record whose client is #f.
* guix/scripts/processes.scm (daemon-sessions)[child-process->session]:
New procedure, with lambda formerly passed to 'map'. Handle #f returns
from 'lookup-process'.
Call 'child-process->session' within 'filter-map', not just 'map'.
Previously, 'process-open-files' would throw ENOENT if an entry had
vanished after the 'scandir' call and before the 'readlink' call.
* guix/scripts/processes.scm (process-open-files): Catch ENOENT errors
from 'readlink'.