>-----Original Message-----
>From: Aaron Conole [mailto:acon...@redhat.com]
>Sent: Monday, April 3, 2017 2:00 AM
>To: Bodireddy, Bhanuprakash <bhanuprakash.bodire...@intel.com>
>Cc: d...@openvswitch.org
>Subject: Re: [ovs-dev] [PATCH 4/7] process: Retrieve process status.
>
>Bhanuprakash Bodireddy <bhanuprakash.bodire...@intel.com> writes:
>
>> Implement function to retrieve the process status. This will be used
>> by Keepalive monitoring thread for detecting false alarms.
>>
>> Signed-off-by: Bhanuprakash Bodireddy
>> <bhanuprakash.bodire...@intel.com>
>> ---
>>  lib/process.c | 60
>>
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>  lib/process.h | 10 ++++++++++
>>  2 files changed, 70 insertions(+)
>>
>> diff --git a/lib/process.c b/lib/process.c index e9d0ba9..e0601dd
>> 100644
>> --- a/lib/process.c
>> +++ b/lib/process.c
>> @@ -50,6 +50,20 @@ struct process {
>>      int status;
>>  };
>>
>> +struct pstate2Num {
>> +    char *tidState;
>> +    int num;
>> +};
>> +
>> +const struct pstate2Num pstate_map[] = {
>> +    { "S", STOPPED_STATE },
>> +    { "R", ACTIVE_STATE },
>> +    { "t", TRACED_STATE },
>> +    { "Z", DEFUNC_STATE },
>> +    { "D", UNINTERRUPTIBLE_SLEEP_STATE },
>> +    { "NULL", UNUSED_STATE },
>> +};
>> +
>>  /* Pipe used to signal child termination. */  static int fds[2];
>>
>> @@ -390,6 +404,52 @@ process_run(void)  #endif  }
>>
>> +int
>> +get_process_status(int tid, int *pstate) { #ifndef _WIN32
>
>The following is Linux specific.  Please use an '#if LINUX' - there are 
>examples
>in the code for this.

That's right. I would do this in v2.

- Bhanuprakash
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to