lkml.org 
[lkml]   [1998]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: A termios path
    Date
    > 
    > hjl@lucon.org (H.J. Lu) writes:
    >
    > > This patch for glibc 2.1 works around a Linux kernel bug, which I don't
    > > see any easy fix. Also
    > >
    > > cfsetispeed (termios_p, (speed_t) 0)
    >
    > I see this is a problem but the whole implementation in the kernel is
    > not suitable as it seems. We can't independently set the input and
    > output speed therefore it does not make sense to remember setting the
    > input speed to zero means setting it to the same value as the output
    > speed.
    >
    > I think the solution which makes most sense is to change the
    > cfsetispeed implementation to do nothing if the parameter is zero.
    > Nothing more. This should solve the problem since it effectively
    > means the input speed is the output speed.
    >
    > Can you try the test suite with this change?
    >

    That was my first approach. It doesn't work with

    cfsetispeed (termios_p, (speed_t) 0);
    if ((speed_t) 0 == cfgetispeed (termios_p))
    ...

    "zero means setting it to the same value as the output speed" only
    apply when tcsetattr is called.


    H.J.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:45    [W:0.021 / U:0.180 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site