diff options
author | Mark H Weaver <mhw@netris.org> | 2013-11-17 02:54:31 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2013-11-23 17:47:39 -0500 |
commit | e7bd20f7d9b2110fdc0fa25db5a2bfe6b2214923 (patch) | |
tree | 1d620b4e237deb068d90a3b5dc97a14e9ed57b7c /doc/ref/api-coverage.texi | |
parent | 17330398d50524058c2ef488bd21ac5ec9c8b6e8 (diff) | |
download | guile-e7bd20f7d9b2110fdc0fa25db5a2bfe6b2214923.tar.gz |
Make (ice-9 popen) thread-safe.
Fixes <http://bugs.gnu.org/15683>.
Reported by David Pirotte <david@altosw.be>.
* module/ice-9/popen.scm: Import (ice-9 threads) and (srfi srfi-9).
(<pipe-info>): New record type.
(port/pid-table): Mark as deprecated in comment.
(port/pid-table-mutex): New variable.
(open-pipe*): Store the pid in the pipe-info record, and store the
pipe-info as a port property. Guard the pipe-info instead of the
port. Lock 'port/pid-table-mutex' while mutating 'port/pid-table'.
(fetch-pid): Removed.
(fetch-pipe-info): New procedure.
(close-process-quietly): Removed.
(close-pipe): Use 'fetch-pipe-info' instead of 'fetch-pid'. Clear
the pid from the pipe-info. Improve error messages.
(reap-pipes): Adapt to the fact that the pipe-info is now guarded
instead of the port. Incorporate the 'waitpid' code that was
previously in 'close-process-quietly', but let the port finalizer
close the port. Clear the pid from the pipe-info.
Diffstat (limited to 'doc/ref/api-coverage.texi')
0 files changed, 0 insertions, 0 deletions