Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Inching closer to booting riak again

- fake crypto server succesful initialization
- implement noop erlang:system_monitor
  • Loading branch information...
commit 6b53ac89824b7d4f4808a9214a2cf140253b08c1 1 parent d94730e
@krestenkrab krestenkrab authored
View
18 src/main/java/erjang/m/crypto_server/Native.java
@@ -0,0 +1,18 @@
+package erjang.m.crypto_server;
+
+import erjang.BIF;
+import erjang.ENative;
+import erjang.EObject;
+import erjang.ERT;
+import erjang.ETuple2;
+
+public class Native extends ENative {
+
+ /** fake that the crypto_server launched */
+
+ @BIF
+ public static EObject init(EObject arg) {
+ return new ETuple2(ERT.am_ok, ERT.NIL);
+ }
+
+}
View
17 src/main/java/erjang/m/erlang/ErlBif.java
@@ -1864,6 +1864,23 @@ static public EObject system_flag(EObject flag_arg, EObject value)
throw new NotImplemented();
}
+
+ static EObject sysmon_pid = ERT.am_undefined;
+
+ @BIF
+ static public EObject system_monitor(EObject pid, EObject opts) {
+ EPID spid = pid.testPID();
+ if(spid == null) throw ERT.badarg(pid, opts);
+ sysmon_pid = pid;
+ return system_monitor();
+ }
+
+ @BIF
+ static public EObject system_monitor() {
+ System.err.println("system_monitor setting ignored");
+ return new ETuple2(sysmon_pid, ERT.NIL);
+ }
+
@BIF
static public EObject memory(EObject type) {
Runtime runtime = Runtime.getRuntime();
Please sign in to comment.
Something went wrong with that request. Please try again.