Ticket #1114 (new enhancement)

Opened 11 months ago

RUN-PROGRAM borks on :ELEMENT-TYPE :DEFAULT

Reported by: fare Owned by:
Priority: normal Milestone: Clozure CL 1.10
Component: Runtime (threads, GC) Version: trunk
Keywords: Cc:

Description

If you call CCL:RUN-PROGRAM with :ELEMENT-TYPE :DEFAULT, you get a low-level error:

Welcome to Clozure Common Lisp Version 1.10-dev-r15900M-trunk  (LinuxX8664)!
? (CCL:RUN-PROGRAM "echo" '("ok" "1") :INPUT NIL :OUTPUT :STREAM :ERROR NIL :WAIT NIL :ELEMENT-TYPE :DEFAULT)
> Error: Not an ivector subtag: 182
> While executing: CCL::SUBTAG-BYTES, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :b
 (7F22FE598698) : 0 (SUBTAG-BYTES 182 1) 93
 (7F22FE5986B8) : 1 (FUNCALL #'#<(:INTERNAL CCL::SCALE-BUFFER-SIZE CCL::OPTIMAL-BUFFER-SIZE)> 65536) 85
 (7F22FE5986E0) : 2 (MAKE-FD-STREAM 5 :DIRECTION :INPUT :INTERACTIVE T :ELEMENT-TYPE :DEFAULT :CLASS CCL::FD-STREAM :SHARING :PRIVATE :CHARACTER-P NIL :BASIC T :ENCODING :UTF-8 :LINE-TERMINATION :UNIX :AUTO-CLOSE T :INPUT-TIMEOUT NIL :OUTPUT-TIMEOUT NIL :DEADLINE NIL) 269
 (7F22FE5987E8) : 3 (GET-DESCRIPTOR-FOR :STREAM #<EXTERNAL-PROCESS (echo ok 1)[NIL] (RUNNING) #x30200049991D> (4) (4) :DIRECTION :OUTPUT :IF-EXISTS :ERROR :ELEMENT-TYPE :DEFAULT :SHARING :PRIVATE :EXTERNAL-FORMAT #<EXTERNAL-FORMAT :UTF-8/:UNIX #x3020004792AD>) 1253
 (7F22FE598898) : 4 (RUN-PROGRAM "echo" ("echo" "ok" "1") :WAIT NIL :PTY NIL :INPUT NIL :IF-INPUT-DOES-NOT-EXIST NIL :OUTPUT :STREAM :IF-OUTPUT-EXISTS :ERROR :ERROR NIL :IF-ERROR-EXISTS :ERROR :STATUS-HOOK NIL :ELEMENT-TYPE :DEFAULT :ENV NIL :SHARING :PRIVATE :EXTERNAL-FORMAT #<EXTERNAL-FORMAT :UTF-8/:UNIX #x3020004792AD> :SILENTLY-IGNORE-CATASTROPHIC-FAILURES NIL) 2477

It works when provided 'CHARACTER instead. :DEFAULT usually works well with OPEN, and may (or then again may not) allow for both WRITE-CHAR and WRITE-BYTE.

In any case, the failure might be as intended, but the failure mode is a bit too low-level.

Note: See TracTickets for help on using tickets.