Work around IDF buffering stdout even when told not to, on ACM consoles.

This commit is contained in:
Jade Mattsson 2024-03-01 16:25:00 +11:00
parent 3946388254
commit 272343c34c
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "user_version.h"
#include "linput.h"
@ -211,6 +212,7 @@ static void dojob (lua_State *L) {
prompt = get_prompt(L, MLref!= LUA_NOREF ? 0 : 1);
input_setprompt(prompt);
lua_writestring(prompt,strlen(prompt));
fsync(fileno(stdout)); /* work around IDF issue on ACM consoles */
}