Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread


By: John Keiser
RE: frozen string on CreateProcess? [ reply ]  
2011-10-17 20:55
I can confirm that setting the argument to S fixes the issue and lets me run a program normally when I specify both app_name and command_line. Patch will follow.

By: Daniel Berger
RE: frozen string on CreateProcess? [ reply ]  
2011-03-25 03:59
I *think* this might be happening because of the way the CreateProcess function is declared in windows-pr. It's set to "P" but it looks like it should be set to "S".

I need to look into it more. I'll keep you posted.



By: Pok Lau
frozen string on CreateProcess? [ reply ]  
2011-03-24 01:08
I tried using Process.create to start a sub process to execute a batch file in a particular directory. This is what I did:

proc_info = Process.create(
:app_name => ENV['SystemRoot'] + "\\system32\\cmd.exe",
:command_line => "C:\\some_bin\\some_cmd.bat some_parameter",
:cwd => "C:\\some_workspace")

The execution failed as:

(eval):3:in `call': can't modify frozen string (TypeError)
from (eval):3:in `CreateProcess'
from C:/Ruby187/lib/ruby/gems/1.8/gems/win32-process-0.6.5/lib/win32/pro
cess.rb:873:in `create'
from some_process_script.rb:11

Did I miss something here?