process run crash on Linux

Issue #5 resolved
Takashi Kato repo owner created an issue

Save the following script and run it on Linux.

#! /bin/sh
#| -*- scheme -*-
exec sash $0 "$@"
|#

(import (scheme base))
(import (prefix (sagittarius process) process-))
(let loop ()
  (process-run "/bin/echo" "ok")
  (loop))

At some point it will raise an condition.

Reported by Seth Alves.

Comments (3)

  1. Takashi Kato reporter

    Modified not to posix_ready not to raise an error. (the same behaviour as Windows) If I run the code, it'll get kernel level stack overflow. Not sure if this is because of the Scheme level process+thread or something else.

  2. Takashi Kato reporter

    The port_ready didn't check if the given FD was exceeded FD_SETSIZE and caused buffer overflow. Added check and if it's exceeded, then returns FALSE now. (not sure if this is proper behaviour or not)

  3. Log in to comment