diff --git a/doors.c b/doors.c index cd85d35..30470d4 100644 --- a/doors.c +++ b/doors.c @@ -179,6 +179,10 @@ void runexternal(struct user_record *user, char *cmd, int stdio, char *argv[], c struct termios oldot; struct termios oldit2; + char inbuf[256]; + char outbuf[256]; + int h; + int g; timeoutpaused = 1; if (write_door32sys(user) != 0) { @@ -254,57 +258,59 @@ void runexternal(struct user_record *user, char *cmd, int stdio, char *argv[], c ret = select(t, &fdset, NULL, NULL, &thetimeout); if (ret > 0) { if (FD_ISSET(door_in, &fdset)) { - len = read(door_in, &c, 1); + len = read(door_in, inbuf, 256); if (len == 0) { close(master); disconnect("Socket Closed"); return; } - if (!raw) { - if (c == '\n' || c == '\0') { + g = 0; + for (h=0;h