DCMD_DUMPER_GETPATH

Get the path of the dump file associated with a process ID

Synopsis:

#include <sys/dcmd_dumper.h>

#define DCMD_DUMPER_GETPATH  __DIOTF(_DCMD_MISC, DUMPER_GETPATH, dump_info_t)

Arguments to devctl():

Argument Value
filedes A file descriptor for the dumper that you obtained by opening /proc/dumper.
dcmd DCMD_DUMPER_GETPATH
dev_data_ptr A pointer to a dump_info_t structure
n_bytes sizeof(dump_info_t)
dev_info_ptr NULL

Description:

This command gets the path of the dump file associated with a given process ID and lets you determine when the dump is finished. To use this command, first use the DCMD_DUMPER_NOTIFYEVENT devctl() command to register for a pulse when the dump begins. When you receive the pulse, use DCMD_DUMPER_GETPATH, passing it the process ID included in the pulse. The command blocks until the dump is finished (because dumper is single threaded) and returns the matching pathname if one exists.

DCMD_DUMPER_GETPATH uses a dump_info_t structure for both input and output:

typedef union {
        struct {
                int pid;
        } i;
        struct {
                char dump_pathname[PATH_MAX + 1];
        } o;
} dump_info_t;

Input:

The i (input) member includes:

pid
The process ID.

Output:

The o (output) member includes:

dump_pathname
The path of the associated dump file.

Errors:

The devctl() function can return the following, in addition to the error codes listed in its entry in the C Library Reference:

ESRCH
A dump file couldn't be found for the process ID. This could mean that dumper's list of dump file names isn't big enough; you can use the -E option to specify the number of entries in it.

See also:

DCMD_DUMPER_NOTIFYEVENT, DCMD_DUMPER_REMOVEALL DCMD_DUMPER_REMOVEEVENT

devctl() in the QNX Neutrino C Library Reference

dumper in the Utilities Reference