me
/
guix
Archived
1
0
Fork 0

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.
master
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
1 changed files with 7 additions and 6 deletions

View File

@ -111,12 +111,13 @@ USERS."
(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.