Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 19 lines 537 B view raw
1diff --git a/config.c b/config.c 2index 6477259..c462ed3 100644 3--- a/config.c 4+++ b/config.c 5@@ -114,9 +114,12 @@ cf_check(void) 6 void 7 cf_parse(void) 8 { 9- FILE *f = fopen(CONFIG_FILE, "r"); 10+ char *config_file = getenv("ISOLATE_CONFIG_FILE"); 11+ if(!config_file) 12+ die("ISOLATE_CONFIG_FILE environment variable not set"); 13+ FILE *f = fopen(config_file, "r"); 14 if (!f) 15- die("Cannot open %s: %m", CONFIG_FILE); 16+ die("Cannot open %s: %m", config_file); 17 18 char line[MAX_LINE_LEN]; 19 while (fgets(line, sizeof(line), f))