- * */
- (void)snprintf(title, sizeof(title), "[lxc monitor] %s %s", c->config_path, c->name);
- INFO("Attempting to set proc title to %s", title);
- (void)setproctitle(title);
+ */
+ ret = snprintf(title, sizeof(title), "[lxc monitor] %s %s", c->config_path, c->name);
+ if (ret > 0) {
+ ret = setproctitle(title);
+ if (ret < 0)
+ INFO("Failed to set process title to %s", title);
+ else
+ INFO("Set process title to %s", title);
+ }