From: nobu.nokada@... Date: 2004-06-30T10:57:19+09:00 Subject: Re: [RCR/BUG?] fix system Hi, At Wed, 30 Jun 2004 02:22:54 +0900, Ara.T.Howard wrote in [ruby-talk:104856]: > - iff stderr IS NOT redirected you must be prepared to catch Errno::ENOENT in > the event your command is not found. > > - iff stderr IS redirected you will NOT be informed of non-existent commands > via an exception and must check $?.exitstatus manually for 127 to > determine if the command was not found Even with stdin or stdout. And you should remember that redirecting stderr is not portable. > - in all cases you must check $?.exitstatus for success since your command > may be found, but fail for other reasons and this will not raise any > errors. Kernel#system returns true when the command succeeded, or false. One thought: system could return nil keeping error info when the command couldn't execute, as perl does. Then, the current behavior would moved to Process.start, invoke or something else. -- Nobu Nakada