diff options
author | Wolfgang Hommel <wolfcw@users.noreply.github.com> | 2016-03-15 12:32:56 +0100 |
---|---|---|
committer | Wolfgang Hommel <wolfcw@users.noreply.github.com> | 2016-03-15 12:32:56 +0100 |
commit | 0af6be50cbc4761566e37a20669fdb05c597fefc (patch) | |
tree | 88aa981882508ded3fe3b1dabffa85f89a3be605 | |
parent | 904cc5007dde130ea45fa7f02c6a0c35dc9fa7e7 (diff) | |
parent | b193c95475cc7cea35e910b34afcfd773d25a63b (diff) | |
download | libfaketime-0af6be50cbc4761566e37a20669fdb05c597fefc.tar.gz |
Merge pull request #87 from steffen-kiess/fix-init
Do not fake times during ftpl_init()
-rw-r--r-- | src/libfaketime.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libfaketime.c b/src/libfaketime.c index 3c6a3f2..7b4668e 100644 --- a/src/libfaketime.c +++ b/src/libfaketime.c @@ -1566,6 +1566,7 @@ parse_modifiers: void ftpl_init(void) { char *tmp_env; + bool dont_fake_final; #ifdef __APPLE__ const char *progname = getprogname(); @@ -1629,6 +1630,8 @@ void ftpl_init(void) #endif #endif + dont_fake = true; // Do not fake times during initialization + dont_fake_final = false; initialized = 1; ft_shm_init(); @@ -1673,7 +1676,7 @@ void ftpl_init(void) if (0 == strcmp(progname, skip_cmd)) { ft_mode = FT_NOOP; - dont_fake = true; + dont_fake_final = true; break; } skip_cmd = strtok_r(NULL, ",", &saveptr); @@ -1714,7 +1717,7 @@ void ftpl_init(void) if (!cmd_matched) { ft_mode = FT_NOOP; - dont_fake = true; + dont_fake_final = true; } } @@ -1841,6 +1844,8 @@ void ftpl_init(void) parse_config_file = false; parse_ft_string(tmp_env); } + + dont_fake = dont_fake_final; } |