]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Protect pidlist with a mutex to avoid a race causing a duplicate free()
authorTim J. Robbins <tjr@FreeBSD.org>
Fri, 3 Jan 2003 04:35:04 +0000 (04:35 +0000)
committerTim J. Robbins <tjr@FreeBSD.org>
Fri, 3 Jan 2003 04:35:04 +0000 (04:35 +0000)
commit77e2381a3ebd5f2128b8fda6100490aaaf42d889
treea07393236b67054d43b67d9362cd022d46373a56
parentf8020ddefe274125088b5f1e64ffed54a88a478c
Protect pidlist with a mutex to avoid a race causing a duplicate free()
when the same pipe FILE is pclosed()'d in different threads, and to avoid
corrupting the linked list when adding or removing items. The symptoms of
the linked list getting corrupted were pclose() either not finding the pipe
on the list, or the list becoming circular and pclose() looping infinitely.
lib/libc/gen/popen.c