[Momonga-devel.ja:00743] Re: merging gcc3 to HEAD (Re: GCC3 の今後)
- From: OZAWA -Crouton- Sakuro <crouton@xxxxxxxxxxxxxxxxx>
- Date: Sat, 9 Nov 2002 11:20:22 +0900
さくです。
In article <20021109111437.38cb9463.crouton@xxxxxxxxxxxxxxxxx>,
OZAWA -Crouton- Sakuro <crouton@xxxxxxxxxxxxxxxxx> writes:
> > open("|snmpget -v1 -c xxxxxx 1.3.6.1.2.1.2.2.1.10.5").each do |line|
> > ina = line.split
> > printf "%s:ppp0_in:%s\n", hostname, ina[3]
> > end
>
> 私も似たようなことやってzombieの群れに遭遇しましたが、SIGCHLDを拾ってwait
> するようにしたら(すぐに拾われるので)出なくなりました。
あう。
私の場合は、
array.each do |name|
open("| ... #{name} ...").each do |line|
# do things
end
end
みたいな、「ループの中で何個もopenを呼ぶ」ケースでzombieが溜まるケースなので、
上の一度きりのopenとは状況が違いますね。ぜんぜん関係ありませんでした。
--
OZAWA -Crouton- Sakuro "DRACO DORMIENS NUMQUAM TITILLANDUS"
Mail: mailto:crouton@xxxxxxxxxxxxxxxx GnuPG: 1C1A 4C26 32E2 A911 7B62
Web: http://www.weatherlight.org/~crouton/ E194 37C0 8725 F1D8 F388