scsh-hackers
[Top] [All Lists]

[Scsh-hackers] [ scsh-Bugs-428180 ] connecting a string port to a proces

To: noreply@sourceforge.net
Subject: [Scsh-hackers] [ scsh-Bugs-428180 ] connecting a string port to a process
From: noreply@sourceforge.net
Date: Mon, 28 May 2001 19:52:32 -0700
List-id: Discussion among the implementors <scsh-hackers.lists.sourceforge.net>
Sender: scsh-hackers-admin@lists.sourceforge.net
Bugs item #428180, was updated on 2001-05-28 19:49
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110493&aid=428180&group_id=10493

Category: run-time
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Brian D. Carlstrom (bdc)
Assigned to: Olin Shivers (olin-shivers)
Summary: connecting a string port to a process

Initial Comment:
From: Allyn Dimock <dimock@deas.harvard.edu>
Cc: "Brian D. Carlstrom" <bdc@ai.mit.edu>, "Olin 
Shivers" <shivers@ai.mit.edu>,
        "Allyn Dimock" <dimock@deas.harvard.edu>
Subject: in scsh: can you connect a string port to a 
process?
Date: 13 Jan 2000 17:16:08 -0500

The following message is a courtesy copy of an article
that has been posted as well.


In scsh: can you connect a string port to a process?

I am looking to feed a computed string (a C-shell 
script) to a
process, and was trying to see if I could get away 
without first
writing it to a file.

the code

(define main
  (lambda ()
     (let* (...
            (input ...)
            (input-as-port (make-string-input-port 
input)))
       (run (/bin/csh)
            (= 0 ,input-as-port)
            (= 2 1)))))

fails with
Error: Not a file descriptor or fdport.
       #{Extensible-input-port}

Writing out to a file and (run (/bin/csh) 
(< ,tmpfile)) works [of course].

Is there a way in scsh to feed text directly to the 
stdin of another
process?

-- Allyn




----------------------------------------------------------------------

>Comment By: Brian D. Carlstrom (bdc)
Date: 2001-05-28 19:52

Message:
Logged In: YES 
user_id=27364

A slightly simpler example. Obviously there is no real file 
descriptor underneath. One could use a unix domain socket 
on unix (but not win32 at the moment) or a plain socket or 
perhaps a ptty or something odd.

Do we want to do this automatically?

Scsh 0.5.3
> (run ("cat") (= 0 ,(make-string-input-port "")))

Error: Not a file descriptor or fdport.
       #{Extensible-input-port}
256
>


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110493&aid=428180&group_id=10493


<Prev in Thread] Current Thread [Next in Thread>