common-lisp - 使用 uiop:launch-program 管道超过两个子进程不起作用
问题描述
我正在尝试使用 管道传输三个或更多子进程的输入/输出uiop:launch-program
,相当于 shell 中的类似内容:C:\> ipconfig | sort | strings
.
我尝试获取一个程序的输出流并将其设置为另一个程序的输入流,重复直到最后一个程序。下面是我的三个子进程的代码,它不起作用。
(uiop:run-program "strings"
:input (uiop:process-info-output
(uiop:launch-program "sort"
:input
(uiop:process-info-output
(uiop:launch-program "ipconfig"
:output :stream))
:output :stream))
:output :interactive)
当我认为它不应该时,这会导致一个空字符串。
有趣的是,两个子流程之间的管道按预期工作。下面是我的两个子流程的代码,它有效。
(uiop:run-program "sort"
:input
(uiop:process-info-output
(uiop:launch-program "ipconfig"
:output :stream))
:output :string)
这将返回一个非空字符串,这是我所期望的。
请帮助我实现将三个程序组合在一起的梦想。
解决方案
推荐阅读
- sql - 在apache derby db中创建用户和书籍之间的关系
- oracle - 如何使用 Execute Immediate 语句嵌套在 Execute Immediate 中
- flutter - Flutter:用于验证的 for 循环只读取第一个索引而不是所有索引
- json - 雪花 - 如何在不使用硬编码键的情况下搜索 json 值中的值
- swift - 如何在 Swift 中关闭 WebView 或 PDFView
- python - 我的 select_sort 函数有什么问题可以给我一些建议吗?
- .net - 任务、长时间运行的任务、设备远程操作通信中的线程(Serial、IVI.NET、Raw-TCP)
- python - Installation of earlier versions of Python (prior to 3.8) fails on Mac with M1 Chip (ARM based Apple Silicon)
- javascript - Jquery在不重新加载页面的情况下无法删除div
- ios - 使用 UIViewPropertyAnimator 为 UILabel textColor 属性设置动画