From: Oliver Peng Date: 2008-03-01T06:15:53+09:00 Subject: SystemStackError: stack level too deep Now I am writing a server code to handle each connection by forking a new process. Here is the code: @tcpServer = TCPServer.new(host, port) while true if tcp = @tcpServer.accept fork do // handle all request in this connection end tcp && tcp.close end end @tcpServer.close_read @tcpServer.close_write I also set up trap to handle CLD signal: trap("CLD") { pid_info_array = Process.waitall } After a period of time, I got the error: SystemStackError: stack level too deep The position is at the line of Process.waitall. I have tried to use Process.wait, but this problem still exist. Any ideas. Thanks. -- Posted via http://www.ruby-forum.com/.