C언어 header/unistd.h
sync(2) - 전체 kernel buffer를 동기화 하기
자연&사람
2019. 10. 1. 22:07
반응형
sync(2)
#include <unistd.h>
void sync(void);
모든 kernel buffer의 내용을 disk에 동기화합니다. LINUX에서는 buffer의 내용이 동기화될 때까지 함수의 return을 하지 않기 때문에 함수가 종료되면 동기화가 완료됩니다.
파라미터
없음
RETURN
없음
활용 예제
Sample
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
......
sync();
......
see also :
반응형