LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-26-2014, 12:46 PM   #16
genss
Member
 
Registered: Nov 2013
Posts: 744

Rep: Reputation: Disabled

i'm beating on a dead horse now
anyway, went to refresh on using termios (and learn more on how it works, ofc)

short story;
in non-canonical mode if VMIN=0 and VTIME=0 then read(stdin) will return immediately even without input
VMIN means minimum characters to return (bytes probably, since utf8 can be multibyte)
VTIME is how many deciseconds to wait for input if there is none already (decisecond = 100ms)
if O_NONBLOCK is set on the file descriptor then VMIN and VTIME are ignored

note that termios has to be restored when exiting since it changes how the actual terminal behaves
on the how to use it, this is very much commented
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
html: line continuation for strings stateless Programming 5 02-18-2014 04:41 AM
how to find continuation of line with PERL menylea Linux - Newbie 2 03-14-2012 01:51 AM
continuation cleopard Programming 1 04-10-2008 12:16 PM
wget continuation problem ksd Linux - Software 2 10-20-2003 10:51 AM
p4pe sound problem continuation shadeXIII Linux - Hardware 1 06-06-2003 10:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration