usr.bin/xinstall/xinstall.c
static
int
mkdir_race(const char *path, int nmode)
{
	int res;
	struct stat sb;

	res = mkdir(path, nmode);
	if (res < 0 && errno == EEXIST) {
		if (stat(path, &sb) == 0 && S_ISDIR(sb.st_mode))
			return(0);
		res = mkdir(path, nmode);
	}
	return (res);
}
/*
 * When doing a concurrent make -j N multiple install's can race the mkdir.
 */
When doing a concurrent make -j N multiple install's can race the mkdir.
When doing a concurrent make - j N multiple install ' s can race the mkdir .
static
int
mkdir_race(const char *path, int nmode)
{
	int res;
	struct stat sb;
	res = mkdir(path, nmode);
	if (res < 0 && errno == EEXIST) {
		if (stat(path, &sb) == 0 && S_ISDIR(sb.st_mode))
			return(0);
		res = mkdir(path, nmode);
	}
	return (res);
}
static int mkdir_race ( const char * path , int nmode ) { int res ; struct stat sb ; res = mkdir ( path , nmode ) ; if ( res < 0 && errno == EEXIST ) { if ( stat ( path , & sb ) == 0 && S_ISDIR ( sb . st_mode ) ) return ( 0 ) ; res = mkdir ( path , nmode ) ; } return ( res ) ; }
When doing a concurrent make -j N multiple install's can race the mkdir.
When doing a concurrent make - j N multiple install ' s can race the mkdir .