DCMD_PROC_CLEAR_FLAG

Clear specific debug flags with the values provided for the process associated with the file descriptor.

#include <sys/procfs.h>

#define DCMD_PROC_CLEAR_FLAG  __DIOT(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 19, uint32_t)

The arguments to devctl() are:

Argument Value
filedes A file descriptor for the process.
dcmd DCMD_PROC_CLEAR_FLAG
dev_data_ptr A pointer to a uint32_t
n_bytes sizeof(uint32_t)
dev_info_ptr NULL

The flags that can be cleared are described in <sys/debug.h>. The argument is a pointer to an unsigned integer that specifies the debug flags to clear. For example:

int flags;

flags = _DEBUG_FLAG_KLC;        /* Kill-on-Last-Close flag */
devctl( fd, DCMD_PROC_CLEAR_FLAG, &flags, sizeof(flags), NULL);

To set the flags, use DCMD_PROC_SET_FLAG.