Re: read problem in tty driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Jan Pazderník wrote:
Hello.I have been working on program based on LDD3 source tiny_tty driver (http://www.cs.fsu.edu/~baker/devices...tty/tiny_tty.c <http://www.cs.fsu.edu/%7Ebaker/devices/lxr/http/source/ldd-examples/tty/tiny_tty.c>) and I have problem with reading from device in user space.

Program works perfectly but when I copy data from driver (equivalent to tiny_timer with using tty_flip_buffer_push and tty_insert_flip_string or tty_insert_flip_char )to user space, data return to buffer in writing function .I can not read data in user space (cat /dev/ttty0) and I have no idea where the problem is.
thanks
Val
Hi,
tty devices are set in canonical mode by default , that means they wait for a CR or LF character before returning data to user space.
You can change this behaviour with the following command:

stty -icanon -F /dev/ttty0

regards
Luca

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux