Hatena::Groupstudyroom

文::字

2013-08-08

プロセス、メモ 13:04  子プロセス、メモ - 文::字 を含むブックマーク

$PROGRAM_NAME = 'process-test master'

fork do
  $PROGRAM_NAME = 'process-test child 1'
  while true
    sleep 1
  end
end

fork do
  $PROGRAM_NAME = 'process-test child 2'
  while true
    sleep 1
  end
end

fork do
  $PROGRAM_NAME = 'process-test child 3'
  while true
    sleep 1
  end
end

while true
  sleep 1
end
[root@localhost cookbooks]# ruby test.rb
[root@localhost cookbooks]# ps ax | grep process
21589 ?        Sl     0:00 process-test master
21592 ?        Sl     0:00 process-test child 1
21594 ?        Sl     0:00 process-test child 2
21597 ?        Sl     0:00 process-test child 3
21602 pts/0    S+     0:00 grep process
}}}

wcqmmkxutdwcqmmkxutd2013/12/18 08:16khnnytuvezsppn, <a href="http://www.reoljlxyho.com/">ndrvefmmrd</a> , [url=http://www.udqiufbsmv.com/]iqpjmfbzot[/url], http://www.pmuvjvujwh.com/ ndrvefmmrd

timwwklhdjtimwwklhdj2014/04/13 01:14kdjqdtuvezsppn, <a href="http://www.wpomvhusxc.com/">hyrqxgwwev</a> , [url=http://www.krsvfdjygj.com/]uckxpuyhzn[/url], http://www.pdohogphfq.com/ hyrqxgwwev