support Pid.Pid.eq=$$

This commit is contained in:
Doug MacEachern 2006-12-30 23:42:38 +00:00
parent a5373bf7cc
commit 790a77c31d
1 changed files with 6 additions and 1 deletions

View File

@ -433,7 +433,12 @@ static int ptql_branch_init_pid(ptql_parse_branch_t *parsed,
{
if (strEQ(parsed->attr, "Pid")) {
branch->flags = PTQL_PID_PID;
branch->data = (void*)atoi(parsed->value); /*XXX*/
if (strEQ(parsed->value, "$$")) {
branch->data = (void*)getpid();
}
else {
branch->data = (void*)atoi(parsed->value); /*XXX*/
}
return SIGAR_OK;
}
else if (strEQ(parsed->attr, "PidFile")) {