Hi Paul, * Paul Eggert wrote on Tue, May 30, 2006 at 09:51:17AM CEST: > Thanks for reporting this. All these failures seem to be due to a > portability problem in lib/closeout.c. Could you please run, say, "cp > --verbose /dev/null /tmp/foo >&- >/dev/null" in a debugger, putting a > breakpoint on the close_stdout function, and see why it isn't calling > 'error' with a nonzero exit_failure value?
(I assume you meant "... >&- 2>/dev/null".) 80 if (prev_fail || fclose_fail) (gdb) bt full #0 close_stdout () at ../../coreutils-5.96/lib/closeout.c:80 prev_fail = 0 '\000' none_pending = 0 '\000' fclose_fail = 0 '\000' #1 0x7afbb880 in exit+0x70 () from /usr/lib/libc.2 No symbol table info available. #2 0x7960 in main (argc=4, argv=0x7eff02f4) at ../../coreutils-5.96/src/cp.c:1022 c = -1 ok = 1 '\001' make_backups = 0 '\000' backup_suffix_string = 0x0 version_control_string = 0x0 x = {backup_type = no_backups, copy_as_regular = 1 '\001', dereference = DEREF_ALWAYS, unlink_dest_before_opening = 0 '\000', unlink_dest_after_failed_open = 0 '\000', hard_link = 0 '\000', interactive = I_UNSPECIFIED, move_mode = 0 '\000', chown_privileges = 0 '\000', one_file_system = 0 '\000', preserve_ownership = 0 '\000', preserve_mode = 0 '\000', preserve_timestamps = 0 '\000', preserve_links = 0 '\000', require_preserve = 0 '\000', recursive = 0 '\000', set_mode = 0 '\000', mode = 0, sparse_mode = SPARSE_AUTO, symbolic_link = 0 '\000', umask_kill = 65533, update = 0 '\000', verbose = 1 '\001', stdin_tty = 0 '\000', dest_info = 0x0, src_info = 0x0} copy_contents = 0 '\000' target_directory = 0x0 no_target_directory = 0 '\000' (gdb) p errno A $2 = 2 Seems "fclose (stdout)" isn't returning an error in this case. Cheers, Ralf _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils