summaryrefslogtreecommitdiff
path: root/guix/scripts/processes.scm
Commit message (Collapse)AuthorAge
* processes: Gracefully handle daemons without clients.Ludovic Courtès2019-04-29
| | | | | | | | | | | | | | | | | | | | | 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'.
* processes: 'process-open-files' ignores disappeared /proc/PID/fd entries.Ludovic Courtès2019-04-29
| | | | | | | | 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'.
* Add 'guix processes'.Ludovic Courtès2018-10-29
* guix/scripts/processes.scm, tests/processes.scm: New files. * Makefile.am (MODULES): Add the former. (SCM_TESTS): Add the latter. * po/guix/POTFILES.in: Add guix/scripts/processes.scm. * doc/guix.texi (Invoking guix processes): New node. (Invoking guix-daemon): Reference it.