Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
実行中のプロセスを名前で見つけ、そのプロセス ID を取得するには、クロスプラットフォームの方法が必要です。次に、boost のプロセス ライブラリを使用して終了します。
Boost のプロセス ライブラリでは、プロセス ID を知る必要があります (http://www.highscore.de/boost/process/reference/classboost_1_1process_1_1process.html)。
そのようなクロスプラットフォーム機能はないと思います。私が知っている最も近いpgrepものは、ライブラリではなくプログラムであり、Windows の一部ではありません。
pgrep
procfs を備えた Unix ライクなシステムでは、必要に応じてスキャン/procして照合する必要があります。Windows でそれを行う方法はわかりませんが、それは可能であり、*nix で行うよりもはるかに悪いことではありません。
/proc