comparison dbutil.c @ 173:257f09a63dab

* add SSH_ASKPASS support (based on patch from Paul Whittaker * don't exit if setnonblocking() fails with "not supported by device" (allows redirection from /dev/null)
author Matt Johnston <matt@ucc.asn.au>
date Mon, 28 Feb 2005 13:01:00 +0000
parents 3e49d8d18005
children 65585699d980
comparison
equal deleted inserted replaced
172:3e49d8d18005 173:257f09a63dab
625 void setnonblocking(int fd) { 625 void setnonblocking(int fd) {
626 626
627 TRACE(("setnonblocking: %d", fd)) 627 TRACE(("setnonblocking: %d", fd))
628 628
629 if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) { 629 if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
630 dropbear_exit("Couldn't set nonblocking"); 630 if (errno == ENODEV) {
631 /* Some devices (like /dev/null redirected in)
632 * can't be set to non-blocking */
633 TRACE(("ignoring ENODEV for setnonblocking"))
634 } else {
635 dropbear_exit("Couldn't set nonblocking");
636 }
631 } 637 }
632 TRACE(("leave setnonblocking")) 638 TRACE(("leave setnonblocking"))
633 } 639 }