mirror of
https://github.com/wolfcw/libfaketime.git
synced 2026-05-17 00:26:16 +03:00
faketime wrapper complains when env vars are set unless comp/w SILENT (closes #307)
This commit is contained in:
@@ -80,6 +80,10 @@
|
||||
# ld automatically choose the correct library version to use for the
|
||||
# target binary. Use for Linux platforms with Multi-Arch support only!
|
||||
#
|
||||
# SILENT
|
||||
# - avoid that the faketime wrapper complains when running within a
|
||||
# libfaketime environment
|
||||
#
|
||||
# * Compilation addition: second libMT target added for building the pthread-
|
||||
# enabled library as a separate library
|
||||
#
|
||||
|
||||
@@ -114,6 +114,12 @@ int main (int argc, char **argv)
|
||||
bool fake_pid = false;
|
||||
const char *pid_val;
|
||||
|
||||
#ifndef SILENT
|
||||
if (getenv("FAKETIME") || getenv("FAKETIME_SHARED") || getenv("FAKETIME_FAKEPID") || getenv("FAKERANDOM_SEED")) {
|
||||
fprintf(stderr, "faketime: You appear to be running faketime within a libfaketime environment. Proceeding, but check for unexpected results...\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
while (curr_opt < argc)
|
||||
{
|
||||
if (0 == strcmp(argv[curr_opt], "-m"))
|
||||
|
||||
Reference in New Issue
Block a user