summaryrefslogtreecommitdiff
path: root/libguile/vm-engine.c
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2013-11-17 02:54:31 -0500
committerMark H Weaver <mhw@netris.org>2013-11-23 17:47:39 -0500
commite7bd20f7d9b2110fdc0fa25db5a2bfe6b2214923 (patch)
tree1d620b4e237deb068d90a3b5dc97a14e9ed57b7c /libguile/vm-engine.c
parent17330398d50524058c2ef488bd21ac5ec9c8b6e8 (diff)
downloadguile-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 'libguile/vm-engine.c')
0 files changed, 0 insertions, 0 deletions