On Mon, Feb 17, 2003 at 10:51:05PM +0100, brusch2 / gmx.net wrote:
> > > system ("start dir") fails, unless a file start.cmd (all executable 
> > > extensions possible?) exists in the current directory (path?).
> > 
> > Or start.exe or start.bat presumably.
> > 
> > I don't understand what you think it should do instead? system("foo") runs
> > command "foo"
> > 
> start is an internal command. 

You mean internal to Windows' command line shell? Does
    system("cmd start dir")
do what you want?

That seems consistent with Unix. For example, if I try to use a command
which is actually a shell built-in command, it fails:

irb(main):001:0> system("ulimit -a")
=> false

I have to invoke the shell explicitly:

irb(main):003:0> system("bash -c \"ulimit -a\"")
core file size        (blocks, -c) unlimited
data seg size         (kbytes, -d) 524288
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) unlimited
max memory size       (kbytes, -m) unlimited
open files                    (-n) 1821
pipe size          (512 bytes, -p) 1
stack size            (kbytes, -s) 65536
cpu time             (seconds, -t) unlimited
max user processes            (-u) 910
virtual memory        (kbytes, -v) 589824
=> true

> Requiring the file and then executing the internal command is a little bit
> strange.

That I agree with :-)

Regards,

Brian.