ChorusOS 5.0 Application Developer's Guide

Process and Actor Commands

The following examples demonstrate the basic commands you can use with either processes or actors:

Launching a Process or Actor Using arun

An embedded actor is launched at boot time. A standard actor or process can be loaded manually from the host, using rsh.

To launch a process or actor with specific options, use the arun command:


% rsh targetname arun -k processname

To launch a process or actor without runtime options, enter the application name at the command line.


% rsh targetname processname

or


% rsh targetname actorname

Listing Processes Using aps

Use the aps command to list all processes running on a target. This command displays the following information for each process:


% rsh targetname aps
UID      PID      NAME            DBG      STAT    GROUP
0        12       MY_PROG         0        SRUN    0
0        3        HR_CTRL         0        SRUN    0
0        2        C_INIT          0        SRUN    0
0        1        init            0        SRUN    0
0        0        unused          0        SRUN    0

For more information, refer to the aps(1M) man page.

Killing Processes Using akill

Use the akill command to kill a process, passing the PID as a parameter:


% rsh targetname akill pid

The previous example showed a process called MY_PROG with a pid of 12 running on the target. To kill this process, you would type the following:


% rsh targetname akill 12

For more information, refer to the akill(1M) man page.


Note -

The ChorusOS operating system does not provide a command to terminate an actor. Actors cannot be terminated using the akill command. They can be terminated using the akill(2K) or the actorDelete(2K) system calls.