--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by funfun.nagaokaut.ac.jp id h5BFw7w31466

Hi,

I have noticed a little strangeness, a mere 'require "tkscrollbox"'
before a fork will cause weird effects even if all Tk
objects are created *after* the fork. Eg exiting the process
which created the Tk objects doesn destroy them and using explicit
$top.withdraw sometimes causes even X server hickup.

Doing the "require" after the fork leads to correct behaviour,
this is ruby-1.6.7 on Redhat 8.0. Is it a known problem?

I have attached the small testprog that demonstrates the
trouble.

Richard

--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename=forktest

#!/usr/bin/ruby

def helper
  finishl
  trap("SIGINT"){finish
  ctr  loop{
    ctr + 
    exit  if finish and ctr>2
    sleep 20
  }
end

def start_helper
  $lpidk{helper}
end

def quit(something)
  #$top.withdraw
  Process.kill("SIGINT",$lpid)
  exit
end

def build_gui
  $top  kRoot.new
  TkButton.new($top) {
    text 'Quit'
    command "quit 'quit-button'"
    pack('fill'both','expand'yes','side'left')
  }
end


## main program ##

# require must come after start_helper, else Tk resources are shared ?!
require "tkscrollbox"

start_helper
build_gui
Tk.mainloop


--UugvWAfsgieZRqgk--