
Strange behaviour of system("start ...") [1.6.8,W2k]
Quote:
> > > 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
Quote:
> Requiring the file and then executing the internal command is a little bit
> strange.
That I agree with :-)
Regards,
Brian.