amano-kenji

Results 309 comments of amano-kenji

```janet (os/spawn ["ls"] :p {:out :pipe}) (forever (ev/sleep 1)) ``` leads to 100% cpu core usage. ```janet (os/spawn ["sleep" "100000000"] :p {:out :pipe}) (forever (ev/sleep 1)) ``` does not. ```janet...

My conclusion is that `ev` cannot sleep if a spawned process with IO pipes exited, but was not closed. Because `ev` keeps trying to sleep, it may lead to 100%...

Here it is. [strace.txt](https://github.com/janet-lang/janet/files/14132556/strace.txt)

```janet (def proc (os/spawn ["ls"] :p {:out :pipe})) (print (ev/read (proc :out) :all)) (forever (ev/sleep 1)) ``` also leads to 100% cpu core usage. To remove a busy loop, replace...

I'm not using `poll`. I used meson to build janet-1.33.0. I did not change the default meson options.

By the way, is garbage collector going to correctly deal with this? ```janet (def proc (os/spawn ["ls"] :p {:out :pipe})) (print (ev/read (proc :out) :all)) (forever (ev/sleep 1)) ``` or...

But, `os/execute` doesn't just send standard output and standard error to /dev/null. Janet doesn't come with `devnull` file as a variable. * What if I want to run and forget...

I think the following commands fixed 100% cpu core usage. ``` meson setup -Depoll=true meson compile ./janet test.janet ``` Perhaps, `epoll` should not even be an option?

Neither `exec-slurp` or `exec-slurp-all` closes IO pipe streams. Perhaps, is it okay to not close proc or IO pipe streams? > And using :pipe as /dev/null is also a bad...

According to my test ``` (os/spawn ["ls"] :p {:out :pipe :err :pipe}) (forever (ev/sleep 1)) ``` led to 100% cpu usage. However, this didn't. ``` (import spork/sh) (os/spawn ["ls"] :p...