By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,492 Members | 1,289 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,492 IT Pros & Developers. It's quick & easy.

Win32::Process::Create - option string trouble

P: 5
Hi,

I am trying to run a Tornado simulator with Perl. The command line in an ordinary Windows command window looks like this:

"C:\Tornado\target\config\simpc\vxWorks.exe /r32000000"

Which I then wish to run inside a Perl script. This then becomes:

Expand|Select|Wrap|Line Numbers
  1. Win32::Process::Create($vxsim_process_object,
  2.                        "C:\\Tornado\\target\\config\\simpc\\vxWorks.exe",
  3.                        "/r32000000",
  4.                        0,
  5.                        NORMAL_PRIORITY_CLASS,
  6.                        ".");
The process starts fine, but the "/r32000000" is not handled correctly. Is this an escape character problem or does the vxWorks.exe executable demand a Unicode option string?

This is an installation of Vanilla Perl running on Windows XP.
Dec 17 '07 #1
Share this Question
Share on Google+
1 Reply


P: 5
Expand|Select|Wrap|Line Numbers
  1. Win32::Process::Create($vxsim_process_object,
  2.                        "C:\\Tornado\\target\\config\\simpc\\vxWorks.exe",
  3.                        'vxWorks.exe /r32000000',
  4.                        0,
  5.                        NORMAL_PRIORITY_CLASS,
  6.                        ".");
Changing line 3 to the above seems to cure the problem nicely.
Dec 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.