-
-
Save jnthn/4dec46cd34c6d7cc0c7e025bff124684 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/io/syncfile.c b/src/io/syncfile.c | |
index 82239ca..9b67b94 100644 | |
--- a/src/io/syncfile.c | |
+++ b/src/io/syncfile.c | |
@@ -166,6 +166,8 @@ static MVMint64 write_bytes(MVMThreadContext *tc, MVMOSHandle *h, char *buf, M | |
/* Flushes the file handle. */ | |
static void flush(MVMThreadContext *tc, MVMOSHandle *h){ | |
MVMIOFileData *data = (MVMIOFileData *)h->body.data; | |
+ if (isatty(data->fd)) | |
+ return; | |
if (MVM_platform_fsync(data->fd) == -1) | |
MVM_exception_throw_adhoc(tc, "Failed to flush filehandle: %s", strerror(errno)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment