sourcecode

Friday, July 6, 2012

Read(2) test

Of course, file descriptor for stdin is 0. So the read() can be used as
read(0, buf, count);
for stdin input.

The return value is always ≤ count.
The return "\n" is read in if input length < count.
When input length > count, the exceeding part is ignored.

http://stackoverflow.com/questions/1237329/read-from-stdin-doesnt-ignore-newline
http://www.yolinux.com/TUTORIALS/ForkExecProcesses.html

http://www.linuxforums.org/forum/programming-scripting/17986-executing-program-execve-function.html
http://support.sas.com/documentation/onlinedoc/sasc/doc/lr2/execve.htm

No comments: