installer: Fix cow-store umount issue.

* gnu/installer/final.scm (kill-cow-users): Ignore exception that could be
raised if a process disappears between reading its pid and its maps file.
This commit is contained in:
Mathieu Othacehe 2020-03-23 18:35:51 +01:00
parent 5490b2c733
commit f9b6f75d1c
No known key found for this signature in database
GPG key ID: 8354763531769CA6

View file

@ -111,12 +111,13 @@ (define %not-nul
(let ((pids
(filter-map (lambda (pid)
(call-with-input-file
(string-append "/proc/" pid "/maps")
(lambda (port)
(and (string-contains (get-string-all port)
cow-path)
(string->number pid)))))
(false-if-exception
(call-with-input-file
(string-append "/proc/" pid "/maps")
(lambda (port)
(and (string-contains (get-string-all port)
cow-path)
(string->number pid))))))
(scandir "/proc" string->number))))
(for-each (lambda (pid)
;; cmdline does not always exist.