1

我刚刚从 Debian 9 切换到 Ubuntu 18.04(不要评判我)。

我在 Debian 9 上有一个可用的 Conky(不要再评判我)脚本,它在最新的 Conky 版本(1.10.9)的 Ubuntu 18.04 上不再运行。

问题是每个自定义命令都会导致以下错误:

write error: Bad file descriptor

它发生在简单的命令上,例如cat文件上的简单命令。然而,这些命令在我的终端中完美运行,但我不断得到这些cat: write error: Bad file descriptor,或者cut: write error: Bad file descriptor取决于命令的任何东西。所以我猜想在捕获命令的输出时出了点问题,但它会是什么?我只是找不到任何线索。

4

1 回答 1

0

使用 strace 命令:strace is a powerful command line tool for debugging and trouble shooting programs in Unix-like operating systems such as Linux. It captures and records all system calls made by a process and the signals received by the process

$ strace cat test
于 2018-05-20T21:19:10.023 回答