안녕하세요?
man페이지에 보시면...
RESTRICTIONS
Some devices are incapable of seeking and POSIX does not specify which devices must support it.
Linux specific restrictions: using lseek on a tty device returns ESPIPE. Other systems return the num
ber of written characters, using SEEK_SET to set the counter. Some devices, e.g. /dev/null do not cause
the error ESPIPE, but return a pointer which value is undefined.
라고 되어 있습니다.
그럼...
: file description number가 output은 1, input은 0번에 할당되어 있다고 들었는데요,
:
: os 프로젝트를 하다가 lseek(0,....)또는 lseek(1,....)이런 것들은 다 -1을 return하네요.
:
: 왜 0번 1번에 대해서 lseek을 하면 에러가 나는거죠?
:
: 답변 부탁드립니다.