Pádraig Brady
44fbd3fd86
sort: avoid redundant processing with inaccessible inputs or output
...
* src/sort.c (check_inputs): A new function to verify all inputs
are accessible before further processing.
(check_output): A new function to open or create a specified
output file, before futher processing.
(stream_open): Adjust to truncating the previously opened
output file rather than opening directly.
(avoid_trashing_input): Optimize to stat the output file
descriptor, rather than the file name.
(main): Call the new functions to check accessibility of
inputs and output, before processing starts.
* tests/misc/sort: Adjust to the changed error message.
* tests/misc/sort-merge-fdlimit: Account for the earlier opened
file descriptor of the specified output file.
* tests/misc/sort-exit-early: A new test to exercise the improvements.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the improvement.
Suggested-by: Bernhard Voelker
2012-07-02 21:14:29 +02:00
..
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-03-07 12:59:00 +00:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-05-08 02:18:39 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:22:24 +02:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-03-10 19:53:06 +00:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:22:24 +02:00
2012-03-20 17:34:28 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-06-05 19:55:26 +02:00
2012-06-05 19:55:26 +02:00
2012-06-10 22:22:39 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-27 19:54:03 +02:00
2012-06-06 22:33:08 +02:00
2012-01-09 21:50:08 +01:00
2012-04-04 12:22:24 +02:00
2012-04-04 12:22:24 +02:00
2012-01-27 11:35:24 +01:00
2012-01-09 21:50:08 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-01-09 21:50:08 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-01-09 21:50:08 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:22:24 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-03-14 09:23:40 -06:00
2012-03-15 12:24:05 -06:00
2012-04-04 12:20:56 +02:00
2012-04-04 12:20:56 +02:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-04-04 12:20:56 +02:00
2012-07-02 21:14:29 +02:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-05 15:13:34 +00:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-04-04 14:30:18 +02:00
2012-07-02 21:14:29 +02:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-07-02 21:14:29 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-05-16 07:46:51 +02:00
2012-01-01 10:04:06 +01:00
2012-03-26 20:56:44 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-25 23:16:17 +00:00
2012-04-19 19:31:48 +02:00
2012-04-04 12:20:56 +02:00
2012-04-19 19:31:48 +02:00
2012-04-04 12:20:56 +02:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-01-09 21:50:08 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-09 21:50:08 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-05 15:12:16 +00:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-05-10 11:02:42 +02:00
2012-05-31 09:37:46 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-05-10 17:09:42 +02:00
2012-01-27 11:35:24 +01:00
2012-05-08 02:18:39 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00