Hello Witali,

the use of 'call' in this context is not legal.

As the documentation explains, 'later' uses 'pipe' internally to fork a child
process, and reads the standard output of that process.

What it does not explain, however, is that 'later' uses (pr) and (rd), i.e. the
PicoLisp binary I/O format, to communicate the result. Therefore it is fatal if
the expression in 'later' writes arbitrary data to standard output.

But 'ls' does write data to stdout here. (later (cons) (call "sleep" 1))
works without problem, because "sleep" does not write anything.

In this context, (call 'ls '-d) is not meaningful, as the date written by 'ls'
are lost. Correct would be to use e.g. (in '(ls -d) (line)).

I added a note to the reference of 'later'.

Cheers,
- Alex

Reply via email to