From: ahoward Date: 2003-02-07T02:11:11+09:00 Subject: pipe.close -> Broken pipe/DRb madness system ruby'ists- on solairs 5.9 and ruby 1.6.8 this is a very silly thing to do : pipe = IO.popen 'while (test 1); do date; done' since you can neither close the pipe nor exit your program willout send a billion 'Broken pipe' messages to the screen. now, i realize this is a very silly thing to do, and the pipe.close waits should call pclose, which would wait4 for the child to die. my question is, shouldn't their be a way to signal a pipe's child that it should die? shouldn't IO.close do this? am i just expecting too much? what i am attempting to do is fork off several processes which will then fire up some DRb servers. the problem is that i want the parent to be able to learn the uri of each of the 'child' DRb objects without using sysvipc. i attempted to do this using a PStore but it seems to be poorly behaved where fork/threads are concerned. so, i was thinking that if i could fork in such a manner that i would maintain communications between parent and child (pipe/fork or popen) that could solve my problems. the problems with this is that DRb servers (forked children) _never die_ as in the 'while' loop above, and thus program shut down becomes difficult. i don't know if any of that made sense, but ideas/suggestions are welcome. -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================