#include <pdump.h>int pdump(int pid);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
The pdump() function stops the process identified by its pid (see getpid(2K)), creates an image of the process context in a core file, and then restarts the process.
The core file contains information about each of the process's threads and all memory regions associated with the process. Only regions attached to the actor are dumped, supervisor regions not bound to the process are not dumped.
The tunable iom.maxcoresize defines a limit (maximum size) that must not be superseded when creating a core file. If iom.maxcoresize is set to 0, no core dump may be performed.
The pdump() function returns 0 if the process was dumped successfully. Otherwise, pdump() returns -1 and sets errno to indicate the error.
The pdump() function will fail and no core file will be generated if:
iom.maxcoresize is set to 0, preventing core file generation.
The size of the generated core file exceeds iom.maxcoresize.
There is not enough memory to perform the request.
The calling process is not a supervisor process, and the process ID of the calling process does not match the process ID of the dumped process.
The process asked for a dump using an invalid pid.
The CORE_DUMP feature is not implemented.
The COREDIR environment variable defines the directory in which all core files are generated. By default, core files are generated in /tmp.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|