+2002-10-17 Christopher Faylor <cgf@redhat.com>
+
+ * dtable.cc (dtable::init_std_file_from_handle): Force "devices" to
+ always be in binary mode. Temporary fix until ssh is rebuilt?
+
2002-10-17 Christopher Faylor <cgf@redhat.com>
* dtable.cc (dtable::set_file_pointers_for_exec): New function.
struct sockaddr sa;
int sal = sizeof (sa);
DCB dcb;
+ unsigned bin = O_BINARY;
first_fd_for_open = 0;
else if (GetCommState (handle, &dcb))
name = "/dev/ttyS0"; // FIXME - determine correct device
else
- name = handle_to_fn (handle, (char *) alloca (MAX_PATH + 100));
+ {
+ name = handle_to_fn (handle, (char *) alloca (MAX_PATH + 100));
+ bin = 0;
+ }
}
if (!name)
else
{
path_conv pc;
- unsigned bin;
fhandler_base *fh = build_fhandler_from_name (fd, name, handle, pc);
- bin = fh->get_default_fmode (O_RDWR);
- if (!bin && name != unknown_file)
- bin = pc.binmode ();
+ if (!bin)
+ {
+ bin = fh->get_default_fmode (O_RDWR);
+ if (!bin && name != unknown_file)
+ bin = pc.binmode ();
+ }
fh->init (handle, GENERIC_READ | GENERIC_WRITE, bin);
set_std_handle (fd);