Hi list,

I want to provide a list of strings the open-pipe* function using apply,
but guile doesn't seem ot like 'apply'ing lists to open-pipe*

 guile> (use-modules (ice-9 popen) (ice-9 rdelim))
 guile> (define temp-port #f)
 guile> (set! temp-port (apply 'open-pipe* OPEN_READ "ls" '("-l")))

 Backtrace:
 In standard input:
    3: 0* (set! temp-port (apply (quote {open-pipe*}) OPEN_READ "ls"
    (quote ("-l"))))
    3: 1* [apply {open-pipe*} "r" "ls" "-l"]
 In unknown file:
    ?: 2  [{open-pipe*}]
    ?: 3* [{open-pipe*} "r" "ls" "-l"]

 ERROR: In procedure apply:
 ERROR: Wrong type argument in position 1: open-pipe*
 ABORT: (wrong-type-arg)

I suspect this is because open-pipe* itself uses apply to call
open-process.

How can I work around this limitation, or am I just doing something
wrong?

Sebastian





Reply via email to