chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Dumbass newbie questions. Sorry.


From: Neil Baylis
Subject: Re: [Chicken-users] Dumbass newbie questions. Sorry.
Date: Thu, 16 Apr 2009 16:41:57 -0700

Excellent, thanks. That works for me.

On Thu, Apr 16, 2009 at 3:58 PM, Shawn Rutledge <address@hidden> wrote:
2009/4/16 Neil Baylis <address@hidden>:
> Re processes/pipes, I had found those by looking in the manual, but am not
> yet sharp enough in scheme to understand them. It looks as though
> (process...) is what I need, but I'm not sure how to use it.

It will give you "ports" for stdin/stdout.  e.g. (example to ssh to a
server, start a process and interact with it):

(let-values ([(recv-port send-port connppid) (process "ssh
address@hidden \"cd prj/dscm/services; ./x10-wish\"")])
...
then you can send and receive stuff, e.g.

(display "hey there" send-port)
and
(let ([response (read recv-port)])
 ... figure out what to do with it ...)

This chapter provides a starting overview of I/O in Scheme in general
(not Chicken-specific):

http://www.scheme.com/tspl3/io.html


reply via email to

[Prev in Thread] Current Thread [Next in Thread]