Explorar el Código

Fix fcntl flag

Samuel Thibault hace 8 años
padre
commit
d1946daa23
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/common/utils.c

+ 2 - 2
src/common/utils.c

@@ -196,8 +196,8 @@ char *_starpu_mktemp(const char *directory, int flags, int *fd)
 	if ((flags & F_NOCACHE) != 0)
 	{
 		int flag = fcntl(*fd, F_GETFL);
-		//flag |= F_NOCACHE;
-		if (fcntl(*fd, F_SETFL, F_NOCACHE) < 0)
+		flag |= F_NOCACHE;
+		if (fcntl(*fd, F_SETFL, flag) < 0)
 		{
 			int err = errno;
 			_STARPU_DISP("Could set F_NOCACHE on the temporary file in  directory '%s', fcntl failed with error '%s'\n", directory, strerror(errno));