Tim Pease
5/28/2009 3:59:00 PM
On Wed, May 27, 2009 at 4:38 PM, Pra Bhandar <pbhandari2050@gmail.com> wrot=
e:
> Hi,
>
> This script has a process leak with a bash session being left open every
> time I run it. =A0I 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 =3D Oratab()
File.open(oratab_file, 'r') do |ofile|
bash.execute ">instancestatus-output.txt"
ofile.each { |oratab_line|
...
}
end
Blessings,
TwP