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.
作成中の iPhone アプリ内からシェル コマンドを実行しようとしています。このアプリは、刑務所で壊れたデバイス用です。アプリに表示するには、コマンドの stdout をキャッチする必要があります。xcodeのgdbが出力を表示しているため、popenがコマンドを実行していることがわかります。また、返されるファイル ポインタは null ではありませんが、ストリームの最初の文字を読み込もうとすると、すぐに eof に到達します。stdout を読み取る方法を教えてもらえますか?