问题标签 [process]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
9 回答
369040 浏览

performance - 有什么办法可以编写一个 Windows .bat 文件来杀死进程?

每次我打开公司拥有的开发机器时,我都必须使用任务管理器或任何其他进程管理应用程序杀死 10 多个进程,才能从我的 IDE 中获得不错的性能。是的,这些是我的公司为了安全和合规而安装在我的机器上的程序的流程。我想做的是有一个 .bat 文件或某种脚本,我可以用它来杀死有问题的进程。

有人知道怎么做这个吗?

0 投票
9 回答
96410 浏览

python - 如何在 Linux 上使用 Python 检查进程是否仍在运行?

我发现的唯一好方法是:

来源
但这可靠吗?它适用于每个流程和每个发行版吗?

0 投票
2 回答
7384 浏览

java - 在 Java 虚拟机中处理信号

是否可以在 Java 虚拟机中处理 POSIX 信号?

至少SIGINTSIGKILL应该是完全独立于平台的。

0 投票
2 回答
1003 浏览

google-chrome - 谷歌浏览器如何控制/包含多个进程?

谷歌浏览器如何命令和控制多个跨平台进程并提供共享窗口/渲染区域?

有什么见解吗?

0 投票
7 回答
28627 浏览

windows - 如何在 Windows 中自动销毁子进程?

在 C++ Windows 应用程序中,我启动了几个长时间运行的子进程(目前我使用 CreateProcess(...) 来执行此操作。

如果我的主进程崩溃或关闭,我希望子进程自动关闭。

由于要求这需要对“父级”崩溃起作用,我相信这需要使用操作系统的某些 API/功能来完成。以便清理所有“子”进程。

我该怎么做呢?

0 投票
14 回答
193432 浏览

java - 如何使用 Java 获取当前打开的窗口/进程的列表?

有谁知道如何使用 Java 获取本地机器当前打开的窗口或进程?

我想要做的是:列出当前打开的任务、窗口或进程打开,就像在 Windows 任务管理器中一样,但使用多平台方法 - 如果可能的话,只使用 Java。

0 投票
3 回答
622 浏览

java - 从 Java 打开文档的更好方法?

我一直在使用以下代码在我的 Windows 机器上使用 Java 打开 Office 文档、PDF 等,它工作正常,除了文件名将其嵌入多个连续空格(如“文件 [SPACE] [空间]Test.doc"。

我怎样才能使这项工作?我不反对将整段代码封装起来……但我不想用调用 JNI 的第三方库来替换它。

编辑:当我用错误的文件运行它时,窗口抱怨找不到文件。但是......当我直接从命令行运行命令行时,它运行得很好。

0 投票
3 回答
13174 浏览

java - Starting a process with inherited stdin/stdout/stderr in Java 6

If I start a process via Java's ProcessBuilder class, I have full access to that process's standard in, standard out, and standard error streams as Java InputStreams and OutputStreams. However, I can't find a way to seamlessly connect those streams to System.in, System.out, and System.err.

It's possible to use redirectErrorStream() to get a single InputStream that contains the subprocess's standard out and standard error, and just loop through that and send it through my standard out—but I can't find a way to do that and let the user type into the process, as he or she could if I used the C system() call.

This appears to be possible in Java SE 7 when it comes out—I'm just wondering if there's a workaround now. Bonus points if the result of isatty() in the child process carries through the redirection.

0 投票
2 回答
472 浏览

mobile - 如何判断一个进程是否在移动设备上运行

我在 Pocket PC 2003 设备上有进程“A”的句柄。我需要确定该进程是否仍在从进程“B”运行。进程“B”是用 Embedded Visual C++ 4.0 编写的。

0 投票
7 回答
2822 浏览

tomcat - Java EE 中有哪些用于定时批处理的工具?

我的雇主刚刚要求我在他们正在运行的 Java EE WebSphere 应用程序中运行一个定时批处理。它应该在每天晚上 11:30 上一节课。

我对 Java EE 和 WebSphere 服务器(或开发环境中的 tomcat)不是很熟悉,我一直在研究,但我发现的只是关于 java timer 类,而不是如何设置或调用它.

似乎也需要编辑 web.xml 文件。

任何帮助将不胜感激!