chicken-janitors
[Top][All Lists]
Advanced

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

Re: [Chicken-janitors] #1274: read-all receiving #<unspecified> unless p


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1274: read-all receiving #<unspecified> unless preceded by a precidate
Date: Thu, 31 Mar 2016 12:48:24 -0000

#1274: read-all receiving #<unspecified> unless preceded by a precidate
----------------------+--------------------
  Reporter:  sjamaan  |      Owner:
      Type:  defect   |     Status:  new
  Priority:  major    |  Milestone:  4.11.0
 Component:  unknown  |    Version:  4.10.x
Resolution:           |   Keywords:
----------------------+--------------------
Description changed by sjamaan:

Old description:

> This happens in csi:
>
> {{{
> #!scm
>
> ;; This works:
> (require-extension utils)
>
> (define (command/string command)
>   (define-values (proc-output proc-input proc-id) (process command))
>   (port? proc-output)
>   (define retval (read-all proc-output))
>   (close-input-port proc-output)
>   (close-output-port proc-input)
>   retval)
>
> (print (command/string "ls"))
> }}}
>
> {{{
> #!scm
>
> ;; This breaks:
>
> (require-extension utils)
>
> (define (command/string command)
>   (define-values (proc-output proc-input proc-id) (process command))
>   (define retval (read-all proc-output))
>   (close-input-port proc-output)
>   (close-output-port proc-input)
>   retval)
>
> (command/string "ls")
>
> ;; Gives us:
> ;; Error: (open-input-file) bad argument type - not a string:
> #<unspecified>
> }}}

New description:

 This happens in csi:

 {{{
 #!scm

 ;; This works:
 (require-extension utils)

 (define (command/string command)
   (define-values (proc-output proc-input proc-id) (process command))
   (port? proc-output)
   (define retval (read-all proc-output))
   (close-input-port proc-output)
   (close-output-port proc-input)
   retval)

 (print (command/string "ls"))
 }}}

 {{{
 #!scm

 ;; This breaks:

 (require-extension utils)

 (define (command/string command)
   (define-values (proc-output proc-input proc-id) (process command))
   (define retval (read-all proc-output))
   (close-input-port proc-output)
   (close-output-port proc-input)
   retval)

 (print (command/string "ls"))

 ;; Gives us:
 ;; Error: (open-input-file) bad argument type - not a string:
 #<unspecified>
 }}}

--

--
Ticket URL: <http://bugs.call-cc.org/ticket/1274#comment:1>
CHICKEN Scheme <http://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

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