Hah, that would explain why it has worked for me. In jni driver on ecl-android I've dup'ed stdin. See file jni/org_lisp_ecl_EmbeddedCommonLisp.c:63
LOGI("Redirecting I/O\n");
snprintf(tmp, 2048, "%s/ecl_output", lisp_dir); mkfifo(tmp, 0664); /* mode is O_RDWR to prevent blocking. Linux-specific. */ fd = open(tmp, O_RDWR | O_NONBLOCK); dup2(fd, 1); dup2(fd, 2); close(fd);
snprintf(tmp, 2048, "%s/ecl_input", lisp_dir); mkfifo(tmp, 0664); fd = open(tmp, O_RDONLY | O_NONBLOCK); dup2(fd, 0); close(fd);
So stdin had a valid value.
Best regards,
Daniel
On 25.08.2017 22:01, PR wrote:
...and finally the OK: problem solved (thanks to Luís Oliveira / Slime mailing list):
This would be a possible patch to 'swank.lisp':
(defun repl-input-stream-read (connection stdin) (loop (let* ((socket (connection.socket-io connection))
(inputs (list socket #-android stdin))
(inputs (list socket stdin)) (ready (wait-for-input inputs))) (cond ((eq ready :interrupt) (check-slime-interrupts))
(quickly tested by me on both Android and PC.)
Paul