| 1 |
|
| 2 |
|
| 3 |
This directory contains two examples: <imore> and <process>. They |
| 4 |
show how you can play with various features of ACE_Process to create |
| 5 |
new processes. |
| 6 |
|
| 7 |
imore: |
| 8 |
----- |
| 9 |
This example shows how to redirect the output of one process (in our |
| 10 |
case, the parent process) to another process (child process.) This is |
| 11 |
very similiar what a UNIX shell does when we "pipe" command together. |
| 12 |
You can select whether you want to use named pipes or a unnamed pipe. |
| 13 |
|
| 14 |
|
| 15 |
process: |
| 16 |
-------- |
| 17 |
|
| 18 |
This example shows how to use ACE_Process to "portably" create new |
| 19 |
processes. The ACE_Process_Options class allows applications to |
| 20 |
portably specify path, command-line arguments, environment variable |
| 21 |
values. It also allows applications to set the new process' standard |
| 22 |
handles (stdin, stdout, and stderr). ACE_Process is created with the |
| 23 |
ACE_Process_Options and can be used to perform operations on the |
| 24 |
running process. |
| 25 |
|
| 26 |
Notice that this example uses NT version's UNIX utilities like |
| 27 |
"DATE.EXE," and "ls.exe." You can find where to get them from |
| 28 |
Microsoft's NT page on the Web. |
| 29 |
|
| 30 |
Run the application as ./process -u to get all the command-line |
| 31 |
options. |
| 32 |
|
| 33 |
Here's an example output: |
| 34 |
|
| 35 |
lambada:OS/Process> ./process -a |
| 36 |
starting... |
| 37 |
starting... |
| 38 |
Sun May 11 15:06:51 CDT 1997 |
| 39 |
date succeeded. |
| 40 |
starting... |
| 41 |
checking ACE_PROCESS_TEST |
| 42 |
ACE_PROCESS_TEST = here's a large number 4294967295. |
| 43 |
ACE_PROCESS_TEST2 = ophilli. |
| 44 |
total 600 |
| 45 |
drwxr-xr-x 5 harrison doc 512 May 11 15:06 . |
| 46 |
drwxr-xr-x 4 harrison doc 512 Apr 21 15:32 .. |
| 47 |
drwx------ 2 harrison doc 512 May 8 22:33 .obj |
| 48 |
drwx------ 2 harrison doc 512 May 8 22:33 .shobj |
| 49 |
drwxr-xr-x 2 harrison doc 512 May 11 15:05 CVS |
| 50 |
-rw-r--r-- 1 harrison doc 1717 Oct 21 1996 Makefile |
| 51 |
-rw-r--r-- 1 harrison doc 10048 Oct 21 1996 Process.mak |
| 52 |
-rw-r--r-- 1 harrison doc 44032 Oct 21 1996 Process.mdp |
| 53 |
-rw-r--r-- 1 harrison doc 1452 May 11 15:05 README |
| 54 |
-rwx--x--x 1 harrison doc 212992 May 11 15:06 process |
| 55 |
-rw-r--r-- 1 harrison doc 10172 May 10 19:38 process.cpp |
| 56 |
-rw------- 1 harrison doc 1380 May 10 19:19 process.wst |