Windows终端许多标签,带有代码1(0x00000001)的进程]

发布于 2025-02-07 03:58:08 字数 355 浏览 2 评论 0原文

每当我在Windows终端上运行nx服务时,一段时间后,我会看到100个标签打开,使用[使用代码1(0x00000001)退出过程] error。他们将所有焦点都取消,直到服务器启动并运行到服务器之前,我无法使用计算机。

有人知道为什么我会看到这些标签以及如何预防它们吗?

When ever I run nx serve on my windows terminal, after a while I see 100's of tabs open up with [process exited with code 1 (0x00000001)] error. They take all the focus away and I am not able to use my computer till the server is up and running.

Does anyone know why I see these tabs and how to prevent them?

Windows terminal with a lot of error tabs

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

巴黎夜雨 2025-02-14 03:58:08

您可能会看到这些选项卡,因为您将Windows终端设置为默认终端。 Windows Terminal默认值仅在客户端应用程序“优雅地”退出时仅关闭TAB/PANE,即带有0的退出代码。然而,老式控制台将始终始终在最后一个客户端退出时关闭窗口,无论出口代码如何。

您在这里看到的是nx服务正在产生一堆儿童进程,这些进程都以1而不是0退出。将复古控制台作为默认终端,这些控制台窗口将立即消失。现在,它们都在终端中的标签上贴上。

您可以通过设置 “ collectOnexit”:“始终” 在您的profiles.defaults中。

最终,nx可能不应使用错误代码1退出,除非实际上有原因是他们返回某种错误(而无需其他记录任何错误)

You're seeing these tabs likely because you've got the Windows Terminal set as the default terminal. Windows Terminal defaults to only closing the tab/pane when a client application exits "gracefully", i.e. with an exit code of 0. The vintage console however would always close the window when the last client exits, regardless of exit code.

What you're seeing here is nx serve is spawning a bunch of child processes that are all exiting with 1, not 0. With the vintage console as the default terminal, these console windows would have all disappeared instantly. Now they all stick around as tabs in the Terminal.

You can get these tabs to disappear instantly by setting "closeOnExit": "always" in your profiles.defaults in the settings.

Ultimately though, nx should probably not be exiting with error code 1, unless there's actually a reason they're returning some sort of error (without otherwise logging any error)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文