summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Soo <jasonsoooz@users.noreply.github.com>2017-09-30 15:51:39 +1000
committerGitHub <noreply@github.com>2017-09-30 15:51:39 +1000
commitd42a2a9ec793c6495a6b1531e2b0882d5f1c2ef5 (patch)
tree398a982685e08cee658f9b53f2e1e66cb23f1b59
parent5d41d41da8f67e396f630280b180cdfb8e56abbc (diff)
downloadlibfaketime-d42a2a9ec793c6495a6b1531e2b0882d5f1c2ef5.tar.gz
Mention possibility of running java in README
-rw-r--r--README11
1 files changed, 9 insertions, 2 deletions
diff --git a/README b/README
index 6077153..dd852fc 100644
--- a/README
+++ b/README
@@ -70,8 +70,9 @@ documentation whether it can be achieved by using libfaketime directly.
intercept by removing the -DPTHREAD_SINGLETHREADED_TIME from the Makefile and
rebuilding libfaketimeMT.so.1
-* Java-/JVM-based applications and others with a complex run-time environment
- are known to not, or not reliably, work with libfaketime.
+* Java-/JVM-based applications work but you need to pass in an extra argument
+ (DONT_FAKE_MONOTONIC). See usage basics below for details. Without this
+ argument the java command usually hangs.
* libfaketime will eventually be bypassed by applications that dynamically load
system libraries, such as librt, explicitly themselves instead of relying on
@@ -139,6 +140,12 @@ Tue Nov 23 12:01:05 CEST 2016
user@host> LD_PRELOAD=/usr/local/lib/libfaketime.so.1 FAKETIME="-15d" date
Mon Nov 8 12:01:12 CEST 2016
+user@host> LD_PRELOAD=/usr/local/lib/libfaketime.so.1 FAKETIME="-15d"
+DONT_FAKE_MONOTONIC=1 java -version
+java version "1.8.0_111"
+Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
+Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
+
The basic way of running any command/program with libfaketime enabled is to
make sure the environment variable LD_PRELOAD contains the path and
filename of the libfaketime library. This can either be done by setting it once