support Pid.Pid.eq=$$
This commit is contained in:
parent
a5373bf7cc
commit
790a77c31d
|
@ -433,7 +433,12 @@ static int ptql_branch_init_pid(ptql_parse_branch_t *parsed,
|
||||||
{
|
{
|
||||||
if (strEQ(parsed->attr, "Pid")) {
|
if (strEQ(parsed->attr, "Pid")) {
|
||||||
branch->flags = PTQL_PID_PID;
|
branch->flags = PTQL_PID_PID;
|
||||||
|
if (strEQ(parsed->value, "$$")) {
|
||||||
|
branch->data = (void*)getpid();
|
||||||
|
}
|
||||||
|
else {
|
||||||
branch->data = (void*)atoi(parsed->value); /*XXX*/
|
branch->data = (void*)atoi(parsed->value); /*XXX*/
|
||||||
|
}
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
else if (strEQ(parsed->attr, "PidFile")) {
|
else if (strEQ(parsed->attr, "PidFile")) {
|
||||||
|
|
Loading…
Reference in New Issue