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.
を使用してファイルを実行していますsystemが、そのプロセスの PID を取得する方法がわかりません。誰も方法を知っていますか?
system
システムの代わりにforkとexecを使用することをお勧めします。子プロセスpidは、フォークから親プロセスに返されます。
明らかでない場合に備えて編集してください。私の答えは、著者が自分の投稿にウィンドウでタグを付ける前でした。私の答えはLinuxに固有のものです。