/** * Returns the JVM's process identifier (PID) via a system call to {@code getpid}. * * @return the JVM's process identifier (PID). * @throws UnsupportedOperationException if JNR POSIX library is not loaded or {@code getpid} is * not available. */ public static int processId() { if (!isGetpidAvailable()) throw new UnsupportedOperationException( "JNR POSIX library not loaded or getpid not available"); return PosixLoader.POSIX.getpid(); } }
public static int getProcessId() { if (!isGetProcessIdAvailable()) { throw new IllegalStateException( "Native call not available. " + "Check isGetProcessIdAvailable() before calling this method."); } return PosixLoader.POSIX.getpid(); }
/** * Returns the JVM's process identifier (PID) * via a system call to {@code getpid}. * * @return the JVM's process identifier (PID). * @throws UnsupportedOperationException if JNR POSIX library is not loaded or {@code getpid} is not available. */ public static int processId() { if (!isGetpidAvailable()) throw new UnsupportedOperationException("JNR POSIX library not loaded or getpid not available"); return PosixLoader.POSIX.getpid(); }
/** * Returns the process identifier of the current Erlang emulator in the * format most commonly used by the operating system environment. * Value is returned as a string containing the (usually) numerical * identifier for a process. * * http://www.erlang.org/doc/man/os.html#getpid-0 */ public static Str getpid_0() { return Str.of(String.valueOf(posix.getpid())); }
/** * Returns the JVM's process identifier (PID) * via a system call to {@code getpid}. * * @return the JVM's process identifier (PID). * @throws UnsupportedOperationException if JNR POSIX library is not loaded or {@code getpid} is not available. */ public static int processId() { if (!isGetpidAvailable()) throw new UnsupportedOperationException("JNR POSIX library not loaded or getpid not available"); return PosixLoader.POSIX.getpid(); }
/** * Returns the JVM's process identifier (PID) * via a system call to {@code getpid}. * * @return the JVM's process identifier (PID). * @throws UnsupportedOperationException if JNR POSIX library is not loaded or {@code getpid} is not available. */ public static int processId() { if (!isGetpidAvailable()) throw new UnsupportedOperationException("JNR POSIX library not loaded or getpid not available"); return PosixLoader.POSIX.getpid(); }
static int getpid() { return getPosix().getpid(); }
@Hide(posixImpl = PosixImpl.JAVA) public static int getpid() { return posix.getpid(); }
public int getpid() { try { return posix.getpid(); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); } }
public int getpid() { return posix().getpid(); }
public int getpid() { try { return posix.getpid(); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); } }
public int getpid() { return posix().getpid(); }
public int getpid() { try { return posix.getpid(); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); } }
public static IRubyObject pid(Ruby runtime) { return runtime.newFixnum(runtime.getPosix().getpid()); }
public static IRubyObject pid(Ruby runtime) { return runtime.newFixnum(runtime.getPosix().getpid()); }
public IRubyObject getValue() { return pid != null ? pid : (pid = runtime.newFixnum(runtime.getPosix().getpid())); }
public IRubyObject getValue() { return pid != null ? pid : (pid = runtime.newFixnum(runtime.getPosix().getpid())); }
public static IRubyObject pid(Ruby runtime) { return runtime.newFixnum(runtime.getPosix().getpid()); }
public static IRubyObject pid(Ruby runtime) { return runtime.newFixnum(runtime.getPosix().getpid()); }
public IRubyObject getValue() { return pid != null ? pid : (pid = runtime.newFixnum(runtime.getPosix().getpid())); }