diff options
author | Adam Mitz <mitza@objectcomputing.com> | 2022-10-11 15:52:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 15:52:48 -0500 |
commit | f63ede24b58993e439c94cf8a3b01773debfba17 (patch) | |
tree | 30e0d1568d39ca73295d80edf9bce65426adba83 /ACE/examples/OS/Process/process.cpp | |
parent | 1bff842cc585cbad02f265371674f83016b174dd (diff) | |
parent | bdde15c15c34f8b4fb04823d2c1ca43a66a5d59d (diff) | |
download | ATCD-f63ede24b58993e439c94cf8a3b01773debfba17.tar.gz |
Merge pull request #1948 from mitza-oci/a6t2-merge
[ACE6-TAO2] Merge selected recent changes from ACE7-TAO3
Diffstat (limited to 'ACE/examples/OS/Process/process.cpp')
-rw-r--r-- | ACE/examples/OS/Process/process.cpp | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/ACE/examples/OS/Process/process.cpp b/ACE/examples/OS/Process/process.cpp index 17e27597fa4..369e7b34f2c 100644 --- a/ACE/examples/OS/Process/process.cpp +++ b/ACE/examples/OS/Process/process.cpp @@ -125,7 +125,7 @@ test_more (void) ACE_Process new_process; ACE_Process_Options options; - options.command_line (executable); + options.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs, executable); options.set_handles (infile); if (new_process.spawn (options) == -1) @@ -154,7 +154,7 @@ static void test_date (void) { ACE_Process_Options options; - options.command_line (DATE_PATH); + options.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs, DATE_PATH); // Try to create a new process running date. ACE_Process new_process; @@ -181,11 +181,7 @@ static void test_ls (void) { ACE_Process_Options options; -#if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR) - options.command_line (ACE_TEXT ("%s -al"), LS_PATH); -#else - options.command_line (ACE_TEXT ("%ls -al"), LS_PATH); -#endif + options.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs ACE_TEXT (" -al"), LS_PATH); ACE_Process new_process; if (new_process.spawn (options) == -1) { @@ -207,11 +203,7 @@ static void test_wait (void) { ACE_Process_Options options; -#if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR) - options.command_line (ACE_TEXT ("%s 10"), SLEEP_PATH); -#else - options.command_line (ACE_TEXT ("%ls 10"), SLEEP_PATH); -#endif + options.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs ACE_TEXT (" 10"), SLEEP_PATH); ACE_Process process1; if (process1.spawn (options) == -1) { @@ -466,11 +458,7 @@ test_setenv (const ACE_TCHAR *argv0) options.setenv (ACE_TEXT ("ACE_PROCESS_TEST= here's a large number %u"), 0 - 1); options.setenv (ACE_TEXT ("ACE_PROCESS_TEST2"), ACE_TEXT ("ophilli")); -#if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR) - options.command_line ("%s -g", argv0); -#else - options.command_line ("%ls -g", argv0); -#endif + options.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs ACE_TEXT (" -g"), argv0); ACE_Process process; if (process.spawn (options) == -1) { @@ -522,13 +510,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) if (run_all) { -#if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR) - const ACE_TCHAR *cmdline = ACE_TEXT ("%s -d -l -s -w"); -#else - const ACE_TCHAR *cmdline = ACE_TEXT ("%ls -d -l -s -w"); -#endif ACE_Process_Options options; - options.command_line (cmdline, argv[0]); + options.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs ACE_TEXT (" -d -l -s -w"), argv[0]); ACE_Process process; if (process.spawn (options) == -1) ACE_ERROR_RETURN ((LM_ERROR, |