From: Tim Pease Date: 2009-05-29T00:58:42+09:00 Subject: Re: Process Leak after using Session module On Wed, May 27, 2009 at 4:38 PM, Pra Bhandar wrote: > Hi, > > This script has a process leak with a bash session being left open every > time I run it.  I can't find a way to close the bash object after I am > done. Docs don't explicitly don't cover this.. or I am missing something > simple. Can anyone shed some light on this or point to docs that I may > not be aware of? I looked at the readme provided by Sessions module > authors so far. > Just a guess here, but try closing your oratab_file descriptor. The bash shell will usually hang around if there are open file descriptors or child processes running. If closing the file descriptor does not work, then try looking for open sockets or running children. oratab_file = Oratab() File.open(oratab_file, 'r') do |ofile| bash.execute ">instancestatus-output.txt" ofile.each { |oratab_line| ... } end Blessings, TwP