在Eclipse CDT控制台中传递传输结束(Ctrl + D)字符 [英] Passing End of Transmission (Ctrl + D) character in Eclipse CDT console

查看:325
本文介绍了在Eclipse CDT控制台中传递传输结束(Ctrl + D)字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C ++应用程序,我需要发送传输结束信号。

I have a C++ application, to which i need to send an End of Transmission signal.

我可以在控制台上执行 Ctrl + D ,但是当我在Eclipse中尝试时,不工作。

I can do a Ctrl+D on the console, but when I try that within Eclipse, it doesn't work.

我正在使用Eclipse Galileo和CDT。

I am using Eclipse Galileo with CDT.

推荐答案

为尚未解决的错误: 错误159803

It seems to be a not yet resolved bug: bug 159803


从Eclipse 3.1开始,可以用 EOF > + D / Z - 可以在键首选项中绑定),我使用简单的Java应用程序成功测试了这一点。

CDT在控制台视图中不会识别 EOF

有一个例外

Since Eclipse 3.1 it is possible to signal EOF (using CTRL + D/Z - bindable in key preferences) in console view, and I tested this successfully with Eclipse 3.2.1 using a simple Java app.
CDT on the other hand will not recognize EOF when in console view.
There is one exception though.

如果我运行一个C / C ++本地应用程序并取消选中连接过程输入和输出到终端在主配置标签中,控制台视图 将识别 EOF

If I run a C/C++ Local App and uncheck "Connect process input & output to a terminal" in the main configuration tab, the console view will recognize EOF.

但是,在调试透视图中,此更改不会影响控制台视图。所以在调试的时候,我仍然不可能向正在运行的应用程序发送 EOF 信号。

However, this change does not affect the console view when in the Debug perspective. So while debugging it is still impossible for me to send an EOF signal to the running application.






4年后更新(2014年12月), Fernando Gonzalez-Sanchez 提及


解决方法复选框在UI中不再可用。

问题仍然发生在OpenSUSE 12& Eclipse CDT Luna 4.4.1。

Workaround checkbox no longer available in UI.
Problem still happening in OpenSUSE 12 & Eclipse CDT Luna 4.4.1.






2015年3月更新:


Update March 2015:

Muhammad Annaqeeb 提及


新的解决方法

There is a new workaround mentioned in the bug page:


在Kepler 4.3 eclipse.buildId = 4.3.0.M20130911-1000在Linux上的问题仍然存在于Java控制台中。我发现了以下解决方法:

In Kepler 4.3 eclipse.buildId=4.3.0.M20130911-1000 on Linux the problem still exists in the Java console. I found the following workaround:

如果你离开控制台专注于另一个视图,然后重新聚焦在控制台上,则 Ctrl D (EOF)按预期工作。

"If you leave the console to focus on another view, and then refocus on the console, then Ctrl-D (EOF) works as expected."


这篇关于在Eclipse CDT控制台中传递传输结束(Ctrl + D)字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆