るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.124秒)
トップページ > 種類:インスタンスメソッド[x] > バージョン:2.6.0[x] > クエリ:e[x] > クエリ:|[x] > クエリ:pid[x] > ライブラリ:ビルトイン[x]

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. matrix det_e
  4. open3 capture2e
  5. matrix rank_e

クラス

検索結果

IO#pid -> Integer | nil (55042.0)

自身が IO.popen で作られたIOポートなら、子プロセスのプロセス ID を 返します。それ以外は nil を返します。

自身が IO.popen で作られたIOポートなら、子プロセスのプロセス ID を
返します。それ以外は nil を返します。

@raise IOError 既に close されている場合に発生します。

//emlist[例][ruby]{
IO.popen("-") do |pipe|
if pipe
$stderr.puts "In parent, child pid is #{pipe.pid}" # => In parent, child pid is 16013
else
$stderr.puts "In child, pid is #{$$}" ...