From: Alex DeCaria Date: 2010-02-22T07:23:08+09:00 Subject: Difference between system() versus exec Kernel methods I'm trying to understand the difference between the Kernel.system and Kernel.exec methods. It was explained in an earlier post that .system started a new process while keeping the old one running, while .exec replaced the current process with the new one (if I read it correctly). I created a simple program called test.rb as follows put "hello" gets puts "bye" and then called it from another program that was simply system("ruby test.rb") or exec "ruby test.rb" I then looked at the processes in Task Manager while running the second program which calls the first. I expected that with system("ruby test.rb") I would see two ruby processes being run, which indeed occured. When I ran the second version with exec "ruby test.rb" there were still two active Ruby processes being run (I expected only one, since one process would be replaced by the other). So, what am I missing? What is the difference between .system and .exec? --Alex -- Posted via http://www.ruby-forum.com/.