Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

considered harmful

Name: Anonymous 2013-02-25 6:06

http://harmful.cat-v.org/software/
>2013
>using harmful software

Name: Anonymous 2013-03-07 7:10

>>160
there exists an abelson such that it smells bad

Name: Anonymous 2013-03-07 15:59

The same should apply to read(1), it should use the same 8k buffer and write it out whenever it fills up. The only important guarantee regarding read(1) is that when it encounters newline, it doesn't read past it, calls write and returns immediately. read -m should, on a sane OS, be in all respects identical to cat, and therefore shouldn't exist.
No, the difference is that cat calls read(fd, buffer, sizeof buffer), while read(1) calls read(fd, &c, 1). This is the difference between cat and read -m. The operating system has no notion of a line. The terminal device, on the other hand, might have.

Of course, read(1) could use a fixed buffer and write as soon as it's full, instead of dynamically resizing it. That's true.

Name: Anonymous 2013-03-08 4:57

No, the difference is that cat calls read(fd, buffer, sizeof buffer), while read(1) calls read(fd, &c, 1). This is the difference between cat and read -m.
The difference should be in observable behaviour. That's the point of discussing whether or not differently implemented operations are equal.

There's no difference in observable behaviour between cat and read -m on a sane OS.

Name: Anonymous 2013-03-08 15:52

Bump!

Name: Anonymous 2013-03-08 15:55

bump -v

Name: Anonymous 2013-03-09 7:54

yolo

Name: Anonymous 2013-04-08 11:01

lel

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List