From 790a77c31d5d182cc83c821ef78ef74492bae27f Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 30 Dec 2006 23:42:38 +0000 Subject: [PATCH] support Pid.Pid.eq=$$ --- src/sigar_ptql.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sigar_ptql.c b/src/sigar_ptql.c index 649edf6d..11b54837 100644 --- a/src/sigar_ptql.c +++ b/src/sigar_ptql.c @@ -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")) {