diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2010-12-13 23:23:17 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2010-12-13 23:23:47 -0800 |
commit | 0da4d843003e9d38624e19c24c7fb670f1bb4749 (patch) | |
tree | d3dec25ace480315613643c1cced91a23d8c49b4 /man/fold.x | |
parent | 6d36bd4c6418083d543c3757905c3202f2d0ee43 (diff) | |
download | coreutils-0da4d843003e9d38624e19c24c7fb670f1bb4749.tar.xz |
sort: fix some --compress reaper bugs
* src/sort.c (uintptr): New type.
(enum procstate, struct procnode, update_proc): Remove.
(proctab_hasher, proctab_comparator, register_proc, wait_proc):
(reap_some): The proctab is now simply a hash of process-IDs
rather than of pointers to objects with reference counts and
states; this is smaller and faster and easier to understand.
(nprocs): Now pid_t, not size_t, since one cannot have more than
PID_MAX children.
(reap): If the argument is -1, wait; if 0 (a new value), do not.
Delete pid from proctab as needed. Ignore children that are not
in proctab, as they are from the program that exec'ed us and are
irrelevant to our success or failure.
(delete_proc, reap_all): New functions.
(open_temp): Register the child.
(sort): Clean up all children afterwards; without this patch,
'sort' sometimes missed failures in children due to race conditions.
* tests/Makefile.am (TESTS): Add misc/sort-compress-proc.
* tests/misc/sort-compress-proc: New file, to test for the
bugs fixed above.
Diffstat (limited to 'man/fold.x')
0 files changed, 0 insertions, 0 deletions