Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 5f55933b3a78b7f3557ac81a2411a1b50bffab33 authored by Georg Brandl on 05 March 2011, 13:54:46 UTC
Close 2.1 branch.
Tip revision: 5f55933
sync.c
/* The equivalent of the Unix 'sync' system call: FlushVol.
   Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
   For now, we only flush the default volume
   (since that's the only volume written to by MacB). */

#include "macdefs.h"

int
sync(void)
{
	if (FlushVol((StringPtr)0, 0) == noErr)
		return 0;
	else {
		errno= ENODEV;
		return -1;
	}
}
back to top