sigerr = signal(i, SIG_DFL);
if (sigerr == SIG_ERR) {
SYSDEBUG("Failed to reset to default action "
- "for signal \"%d\": %d", i, pid);
+ "for signal \"%d\": %d", i, pid);
}
}
if (sid < 0)
DEBUG("Failed to make child session leader");
- if (ioctl(STDIN_FILENO, TIOCSCTTY, 0) < 0)
- DEBUG("Failed to set controlling terminal");
+ if (ioctl(STDIN_FILENO, TIOCSCTTY, 0) < 0)
+ DEBUG("Failed to set controlling terminal");
NOTICE("Exec'ing \"%s\"", my_args.argv[0]);
/* Check the command options */
if (!args->name) {
- if(!args->quiet)
+ if (!args->quiet)
fprintf(stderr, "lxc-init: missing container name, use --name option\n");
return -1;
}
return 0;
}
-static void lxc_monitord_sockfd_remove(struct lxc_monitor *mon, int fd) {
+static void lxc_monitord_sockfd_remove(struct lxc_monitor *mon, int fd)
+{
int i;
if (lxc_mainloop_del_handler(&mon->descr, fd))
static int lxc_monitord_sock_accept(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
{
- int ret,clientfd;
+ int ret, clientfd;
struct lxc_monitor *mon = data;
struct ucred cred;
socklen_t credsz = sizeof(cred);
static int lxc_monitord_fifo_handler(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
{
- int ret,i;
+ int ret, i;
struct lxc_msg msglxc;
struct lxc_monitor *mon = data;
ret = lxc_write_nointr(mon->clientfds[i], &msglxc, sizeof(msglxc));
if (ret < 0)
SYSERROR("Failed to send message to client file descriptor %d",
- mon->clientfds[i]);
+ mon->clientfds[i]);
}
return LXC_MAINLOOP_CONTINUE;
}
ret = snprintf(logpath, sizeof(logpath), "%s/lxc-monitord.log",
- (strcmp(LXCPATH, lxcpath) ? lxcpath : LOGPATH ));
+ (strcmp(LXCPATH, lxcpath) ? lxcpath : LOGPATH));
if (ret < 0 || ret >= sizeof(logpath))
exit(EXIT_FAILURE);