On 4/14/17 4:57 PM, Stephen Hemminger wrote: > Overall, this looks like a good idea. > >> + >> +int get_comm(char *pid, char *comm, int len) > > > Please use more glibc style function signature, like: > > int get_comm(const char *pid, char *comm, size_t len) > > And maybe even > int get_command_name(pid_t pid, char *comm, size_t len) >
I'd pref to keep as char *. No sense converting from string to pid_t to string. The vrf code is reading a cgroups file; the other potential user is netns which is also reading pid from a file.