From 3ef0fe19f874fff21fb0e04612bf358b1a151a9c Mon Sep 17 00:00:00 2001
From: Aldo Adirajasa Fathoni <aldo.alfathoni@gmail.com>
Date: Tue, 26 Sep 2023 13:21:02 +0700
Subject: [PATCH] Fix calling write() from int instead of os

---
 console/socketiod | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/console/socketiod b/console/socketiod
index a53a6f1..3c3c9b6 100755
--- a/console/socketiod
+++ b/console/socketiod
@@ -176,7 +176,7 @@ def connect(sid, environ):
     if child_pid:
         # already started child process, don't start another
         # write a new line so that when a client refresh the shell prompt is printed
-        fd.write("\n")
+        os.write(fd, str.encode("\n"))
         return
 
     # create child process attached to a pty we can read from and write to