sigset_t sigset;
if ((ret = sigemptyset(&sigset)) < 0) {
- perror("sigemptyset");
+ PERROR("sigemptyset");
return ret;
}
sa.sa_mask = sigset;
sa.sa_flags = 0;
if ((ret = sigaction(SIGTERM, &sa, NULL)) < 0) {
- perror("sigaction");
+ PERROR("sigaction");
return ret;
}
if ((ret = sigaction(SIGINT, &sa, NULL)) < 0) {
- perror("sigaction");
+ PERROR("sigaction");
return ret;
}
if ((ret = sigaction(SIGPIPE, &sa, NULL)) < 0) {
- perror("sigaction");
+ PERROR("sigaction");
return ret;
}
while (1) {
int option_index = 0;
- c = getopt_long(argc, argv, "dhqvVku" "c:e:g:", long_options, &option_index);
+ c = getopt_long(argc, argv, "dhqvVku" "c:e:g:",
+ long_options, &option_index);
if (c == -1) {
break;
}
switch (c) {
case 0:
- fprintf(stderr, "option %s", long_options[option_index].name);
+ fprintf(stderr, "option %s",
+ long_options[option_index].name);
if (optarg) {
fprintf(stderr, " with arg %s\n", optarg);
ret = -1;