본문 바로가기

IT

fcntl을 이용한 (뭐하는지 모르겠는) 코드

#include <fcntl.h>


int main()

{

int s, result;

s= fcntl(1,F_GETFL);

s = s | O_SYNC;

result = fcntl(1, F_SETFL, s);


if (result == -1)

{

perror("setting SYNC");

}


return 0;

}

'IT' 카테고리의 다른 글

아규먼트로 y를 주면 echo를 켜는 프로그램.  (0) 2014.10.08
echo 상태를 나타내는 코드  (0) 2014.10.08
getchar를 이용한 (뭐하는지 모르겠는)  (0) 2014.10.08
rm1.c  (0) 2014.10.01
mkdir1.c  (0) 2014.10.01