summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cd2e0b6)
char path_trace[PATH_MAX];
int path_trace_len;
char *path_trace_ptr;
char path_trace[PATH_MAX];
int path_trace_len;
char *path_trace_ptr;
if(channel_dir == NULL) {
perror(subchannel_name);
open_ret = ENOENT;
if(channel_dir == NULL) {
perror(subchannel_name);
open_ret = ENOENT;
}
printf("Creating trace subdirectory %s\n", subtrace_name);
}
printf("Creating trace subdirectory %s\n", subtrace_name);
if(ret == -1) {
if(errno != EEXIST) {
perror(subtrace_name);
if(ret == -1) {
if(errno != EEXIST) {
perror(subtrace_name);
} else {
printf("File %s exists, cannot open. Try append mode.\n", path_trace);
open_ret = -1;
} else {
printf("File %s exists, cannot open. Try append mode.\n", path_trace);
open_ret = -1;
}
} else {
if(errno == ENOENT) {
}
} else {
if(errno == ENOENT) {
if(daemon_mode) {
ret = daemon(0, 0);
if(daemon_mode) {
ret = daemon(0, 0);
-
- if(ret == -1) {
- perror("An error occured while daemonizing.");
- exit(-1);
- }
- }
+
+ if(ret == -1) {
+ perror("An error occured while daemonizing.");
+ exit(-1);
+ }
+ }
/* Connect the signal handlers */
act.sa_handler = handler;
/* Connect the signal handlers */
act.sa_handler = handler;