Sync popen(3) with FreeBSD:
authorPeter Avalos <pavalos@theshell.com>
Sun, 15 Mar 2009 03:32:32 +0000 (17:32 -1000)
committerPeter Avalos <pavalos@theshell.com>
Tue, 7 Apr 2009 07:09:50 +0000 (21:09 -1000)
commit787d3afaff5c9a5a75fbda3f85d79a03124094b4
treedf610b97fadf0b3ad0d8494fcd2ee8ced152a3e4
parentecd27a2e8c77bf6d392a35dc4a7356b54a00584b
Sync popen(3) with FreeBSD:

* Convert popen()'s `pidlist' to a SLIST, for consistency.

* 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.
lib/libc/gen/popen.c