Get the path of the dump file associated with a process ID
#include <sys/dcmd_dumper.h> #define DCMD_DUMPER_GETPATH __DIOTF(_DCMD_MISC, DUMPER_GETPATH, dump_info_t)
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 |
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;
The i (input) member includes:
The o (output) member includes:
The devctl() function can return the following, in addition to the error codes listed in its entry in the C Library Reference:
DCMD_DUMPER_NOTIFYEVENT, DCMD_DUMPER_REMOVEALL DCMD_DUMPER_REMOVEEVENT
devctl() in the QNX Neutrino C Library Reference
dumper in the Utilities Reference