Skip to content

Using os module functions causes root fiber to panic #17

@eko234

Description

@eko234

Hi, I'm trying to write a little web app on circlet and I'm trying to spawn some processes like this one when I receive a request to certain endpoint.

(defn getls
  "gets ls from bin dir" []
  (def procc (os/spawn ["ls"] :p {:in :pipe :out :pipe :err :pipe}))
  (pp :waiting_for_proc)
  (pp (:wait procc))
  [(:read (procc :out) :all)
   (:read (procc :err) :all)])

the first time I get the request nothing happens, but when I try to request again I got an error that says:
current fiber is already waiting for event

could you explain me why this happens? is this a bug or maybe I'm not familiar enough with how things work in Janet or with Circlet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions