Using the personal daemon

The personal daemon is started and used by a single user. Users have their own personal daemon. Therefore, the personal daemon has access to everything that the user have authority to access. The personal daemon can be started before being used; otherwise, the client will start the personal daemon if it is not running. If it is the client that starts the personal daemon, the first build might take longer than subsequent builds.

The personal daemon and client use named pipes to communicate. The daemon creates a .dbb directory in the user's home directory and stores a .pid file containing its process ID and sets up a named pipe to receive build requests. The client sets up a named pipe in the .dbb directory to receive responses from the build processes.

If the client starts and finds that there is no personal daemon running, the client will start the personal daemon and proceed to send the build process request.

Running the personal daemon

You can run the personal daemon by using any of the following methods:

Issuing a command

To issue a command to the personal daemon, you must use the daemon client. The client can be accessed by using groovyz or calling the client directly (/usr/lpp/IBM/dbb/lib/pclient -h).

Examples

Note:

Personal daemon options

Time out

The personal daemon will time out after a period of time, 8 hours by default. You can use the -t n[hms] option to change the timeout interval. Specify a number for the timeout value. The number can be qualified as h-hours, m-minutes, or s-seconds. If not qualified, the number is assumed to be hours. Use -t -1 for no timeout. If no timeout, the personal daemon will run until you issue the pclient STOP command.

Process definitions file

The process definitions file defines all of the processes that can be started. Only one personal daemon is started if you set the count to greater than 0 in the process definitions file. You can start additional personal daemon using pclient groovyz start.

You can use the option, -p /u/user/process_definitions.xml, to specify a process definitions file. If it is not specified, the daemon will search the following locations:

Managing processes

The daemon is a process coordinator that allows you to use commands to start and stop processes. The personal daemon uses the same process_definitions.xml file as the shared daemon. However, the personal daemon starts only one process for a definition regardless of the count. You can manually start additional processes.

For example, if more build slots are needed, you can launch another process with pclient groovyz start.

Alternatively, if that process is no longer needed, you can kill it by using pclient groovyz kill.

If the daemon receives an exception from the script that it is executing, that process will be restarted.

Additional information

Running multiple builds concurrently

The daemon can have multiple processes, which supports multiple builds.

Handling return codes

Only the return codes from System.exit() calls in the Groovy build script are captured by the daemon. In other words, values returned by the Groovy build script by using return are not captured by the daemon.