From: Albert Schlef Date: 2011-03-02T12:39:35+09:00 Subject: Re: exec using sh -c or directly running the command, depending on the system Ruby tells the shell to execute the command (that's why you see "sh -c") because only the shell knows to parse the command string (special characters, redirections, etc.). The shell, in its turn, executes the program(s) mentioned in the command string. In other words: your 'top' (I use 'htop', which is better) should show *two* processes: "sh -c ...." and "ruby ...". The latter is a child of the former. If you're using 'htop' you can hit 't' to see the list formatted as a tree: you'll see that the latter is indeed a child of the former. Perhaps your Debian's 'top' is configured a bit differently than your Ubuntu's and that's why you don't see the exact same picture. I'm using Ubuntu and I see both processes. (BTW, you can replace 'ruby "runned.rb"' with 'exec ruby "runned.rb"' to tell the shell to throw away its own proceess. But don't do this, because it's not portable.) -- Posted via http://www.ruby-forum.com/.