Skip to content

Commit

Permalink
print cause of error when loading the config file is not possible
Browse files Browse the repository at this point in the history
  • Loading branch information
tudurom committed Jan 3, 2019
1 parent 45b027c commit 9cb6396
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3620,11 +3620,14 @@ load_defaults(void)
static void
load_config(char *config_path)
{
if (fork() == 0) {
int f = fork();
if (f == 0) {
setsid();
DMSG("loading %s\n", config_path);
execl(config_path, config_path, NULL);
errx(EXIT_FAILURE, "couldn't load config file");
err(EXIT_FAILURE, "couldn't load config file");
} else if (f == -1) {
err(EXIT_FAILURE, NULL);
}
}

Expand Down

0 comments on commit 9cb6396

Please sign in to comment.