From: Lui F. <fun...@gm...> - 2006-06-08 03:13:56
|
(resent. I sent the original msg before I confirm my email membership...) Hi all, Can anyone explain how I can run a shell subprocess within sbcl repl? I tried all the combination of :input :output and :pty but it doesn't seem to work. I don't know enough of sbcl's internal to figure out what's missing. Attached are some sessions with sbcl and acl80 (which can run sh without any problem) under linux 2.6. Thanks in advance, fungsin. vmware@vmware-bavm:~$ sbcl This is SBCL 0.9.11, an implementation of ANSI Common Lisp. * (run-program "/usr/bin/who" nil :input t :output t :wait t :pty nil) vmware :0 Jun 6 06:09 vmware pts/2 Jun 6 06:21 (:pts/0:S.0) vmware pts/3 Jun 6 11:08 (:pts/0: S.1) vmware pts/4 Jun 6 11:11 (:pts/0:S.2) vmware pts/5 Jun 6 11:23 (:pts/0:S.3) #<SB-IMPL::PROCESS 6986 :EXITED> * (run-program "/bin/sh" nil :input t :output t :wait t :pty nil) Ctrl-\ Quit * (run-program "/bin/sh" nil :input t :output t :wait t :pty t) Ctrl-\ Quit ;; ACL 80 CL-USER(2): (run-shell-command "who") vmware :0 Jun 6 06:09 vmware pts/2 Jun 6 06:21 (:pts/0:S.0) vmware pts/3 Jun 6 11:08 (:pts/0:S.1) vmware pts/4 Jun 6 11:11 (:pts/0: S.2) 0 CL-USER(3): (shell "/bin/sh") sh-3.00$ ls gconfd-vmware keyring-cgtpMG orbit-vmware ssh-PyhjPx6302 sh-3.00$ exit exit 0 CL-USER(4): |