Lisp HUG Maillist Archive

send standard input with sys:open-pipe

I'm trying to run a program that reads on standard input and then writes the result on standard output. I'm not seeing how to do that in LispWorks (Mac 7.1). I have used sys:open-pipe before, but just to drive an interactive program. Below is my failed attempt - it just hangs.


John DeSoi, Ph.D.



(defun test (&optional (input "Test 123"))
  (let ((pipe (sys:open-pipe "cat" :direction :io :element-type 'character :save-exit-status t :use-pty t))
        (out-stream (make-string-output-stream :element-type 'character))
        (ch nil)
        (out "")
        (result -1))
    (write-line input pipe)
    (write-char #\ETX pipe) ;Ctrl-C and also tried Ctrl-D. 
    (force-output pipe)
    (setf result (sys:pipe-exit-status pipe :wait t))
    (loop while (setf ch (read-char-no-hang pipe nil nil)) do
                           (write-char ch out-stream))
    (close pipe)
    (setf out (get-output-stream-string out-stream))
    (values out result)))

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

(win32:set-application-themed nil) hides menus in LW7.1 PE on Windows 10

Hello folks,

Calling
    (win32:set-application-themed nil)
results in hiding pull-down menus in Lispworks IDE.

Even in open windows, clicking on a menu name has no effect and the menu  
is not shown.

Calling
     (win32:set-application-themed t)
restores all the functionality.

I have tried the standard and high-contrast themes on Windows 10.
--
Dmitry Ivanov
lisp.ystok.ru

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Re: (win32:set-application-themed nil) hides menus in LW7.1 PE on Windows 10

> Calling
>     (win32:set-application-themed nil)
> results in hiding pull-down menus in Lispworks IDE.

This seems to happen if I call (win32:set-application-themed nil) from the  
Listener before the Editor window is open.

If this call is made after the Editor is open, everything works fine.
--
Dmitry Ivanov
lisp.ystok.ru

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Updated at: 2020-12-10 08:28 UTC