Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 086d790

Browse files
committed
[12315] Ensure files open for driver have stdio buffering turned off
1 parent a3f717e commit 086d790

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

docs/notes/bugfix-12315.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure write to serial port has an immediate result

engine/src/dsklnx.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,6 +1260,7 @@ class MCLinuxDesktop: public MCSystemInterface
12601260

12611261
if (t_fptr != NULL)
12621262
{
1263+
setbuf(t_fptr, nullptr);
12631264
configureSerialPort((short)fileno(t_fptr));
12641265

12651266
t_handle = new (nothrow) MCStdioFileHandle(t_fptr);

engine/src/dskmac.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4087,6 +4087,7 @@ struct MCMacDesktop: public MCSystemInterface, public MCMacSystemService
40874087

40884088
if (fptr != NULL)
40894089
{
4090+
setbuf(fptr, nullptr);
40904091
int val;
40914092
int t_serial_in;
40924093

0 commit comments

Comments
 (0)