Persistent Memory Development Kit
This is src/test/tools/ctrld/README.
This directory contains a simple application for controlling applications
run in background. The application works on a PID file which plays a role of
an unique identifier of an application run in background.
You can use the command as following:
usage: ctrld <pid file> <cmd> [<arg>]
Available commands:
run <command> [<arg>...] -- run specified command in a background and store
its PID in a <pid file>
wait [<timeout>] -- wait until a process identified by a
<pid file> ends for at most <timeout>
seconds
wait_port <port> -- wait until a port <port> is opened
kill <signo> -- send a <signo> signal to a process identified
by a <pid file>
The process run in background is daemonized. The exit code of ctrld with wait command
is the same as the command of interest.
The PID file may contains the following data:
- PID number
- PID number and return value in a format <PID>r<exit code>