shared: rework env file reader

Implement this with a proper state machine, so that newlines and
escaped chars can appear in string assignments. This should bring the
parser much closer to shell.
This commit is contained in:
Lennart Poettering
2013-04-03 20:12:57 +02:00
parent 7f602784de
commit f73141d765
9 changed files with 442 additions and 151 deletions
+1 -1
View File
@@ -1741,7 +1741,7 @@ int exec_context_load_environment(const ExecContext *c, char ***l) {
return -EINVAL;
}
for (n = 0; n < count; n++) {
k = load_env_file(pglob.gl_pathv[n], &p);
k = load_env_file(pglob.gl_pathv[n], NULL, &p);
if (k < 0) {
if (ignore)
continue;