본문 바로가기

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' 카테고리의 다른 글

KHULKHUL 블로그