On Tuesday 13 November 2007 16:55, Alexander Kriegisch wrote: > I just wanted to adopt the patch, but notices that > a) Fernando's exit code patch (as suggested by Ralf) has not been > committed yet and thus is not part of the patch either and
It is: http://busybox.net/downloads/fixes-1.8.1/busybox-1.8.1-tr.patch - size_t read_chars = 0, in_index = 0, out_index = 0, c, coded, last = -1; + ssize_t read_chars = 0; + size_t in_index = 0, out_index = 0, c, coded, last = -1; read_chars = read(STDIN_FILENO, tr_buf, BUFSIZ); if (read_chars <= 0) { - if (write(STDOUT_FILENO, (char *)output, out_index) != out_index) - bb_perror_msg(bb_msg_write_error); + xwrite(STDOUT_FILENO, (char *)output, out_index); + if (read_chars < 0) + bb_perror_msg_and_die(bb_msg_read_error); exit(EXIT_SUCCESS); It will correctly detect read errors now and will exit with a message and error code of 1. > b) Denys optimised a few other things I have not looked into, I admit. > Should they also be part of the patch or are they of minor > importance? These changes are in svn and will be in 1.9.0. They change no functionality, only make code smaller and more understandable. -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
