FreeBSD/usr.sbin/pmcstat/pmcstat.c
/*
 * Do process profiling
 *
 * If a pid was specified, attach each allocated PMC to the target
 * process.  Otherwise, fork a child and attach the PMCs to the child,
 * and have the child exec() the target program.
 */
Do process profiling
If a pid was specified, attach each allocated PMC to the target
process.  Otherwise, fork a child and attach the PMCs to the child,
and have the child exec() the target program.
Do process profiling If a pid was specified attach each allocated PMC to the target process . Otherwise fork a child and attach the PMCs to the child and have the child exec () the target program .
void
pmcstat_start_process(void)
{
	if (write(pmcstat_sockpair[PARENTSOCKET], "!", 1) != 1)
		err(EX_OSERR, "ERROR (parent): write of token failed");
	(void) close(pmcstat_sockpair[PARENTSOCKET]);
}
void pmcstat_start_process ( void ) { if ( write ( pmcstat_sockpair [ PARENTSOCKET ] , " " , 1 ) != 1 ) err ( EX_OSERR , " " ) ; ( void ) close ( pmcstat_sockpair [ PARENTSOCKET ] ) ; }
Do process profiling
 If a pid was specified, attach each allocated PMC to the target
 process.
Do process profiling If a pid was specified attach each allocated PMC to the target process .
/* Signal the child to proceed. */