CVSROOT: /cvs Module name: src Changes by: mill...@cvs.openbsd.org 2015/03/31 05:46:26
Modified files: usr.bin/sort : sort.c Log message: Add missing call to atexit() to clean up temp files on error. Use mkstemp() to create the temp file when "sort -o" specifies the same name as an input file and preserve the original file mode on the temp file. Check for write access on the original file before creating the temporary. Based on a diff from and OK bluhm@