return 1;
}
+/* returns the PID of the current process */
+static int
+smp_fetch_pid(const struct arg *args, struct sample *smp, const char *kw, void *private)
+{
+ smp->data.type = SMP_T_SINT;
+ smp->data.u.sint = pid;
+ return 1;
+}
+
+
/* returns the number of the current process (between 1 and nbproc */
static int
smp_fetch_proc(const struct arg *args, struct sample *smp, const char *kw, void *private)
{ "date_us", smp_fetch_date_us, 0, NULL, SMP_T_SINT, SMP_USE_CONST },
{ "hostname", smp_fetch_hostname, 0, NULL, SMP_T_STR, SMP_USE_CONST },
{ "nbproc", smp_fetch_nbproc,0, NULL, SMP_T_SINT, SMP_USE_CONST },
+ { "pid", smp_fetch_pid, 0, NULL, SMP_T_SINT, SMP_USE_CONST },
{ "proc", smp_fetch_proc, 0, NULL, SMP_T_SINT, SMP_USE_CONST },
{ "quic_enabled", smp_fetch_quic_enabled, 0, NULL, SMP_T_BOOL, SMP_USE_CONST },
{ "thread", smp_fetch_thread, 0, NULL, SMP_T_SINT, SMP_USE_CONST },