jnr.posix.POSIXFactory Java Examples

The following examples show how to use jnr.posix.POSIXFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChaosMonkeyIntegrationTest.java    From incubator-pinot with Apache License 2.0 5 votes vote down vote up
private void sendSignalToProcess(Process process, Signal signal) {
  int processPid = getProcessPid(process);
  if (processPid != -1) {
    LOGGER.info("Sending signal {} to process {}", signal.intValue(), processPid);
    POSIXFactory.getNativePOSIX().kill(processPid, signal.intValue());
  }
}
 
Example #2
Source File: Info.java    From galeb with Apache License 2.0 4 votes vote down vote up
public static int getPid() {
    final POSIX posix = POSIXFactory.getNativePOSIX();
    return posix.getpid();
}
 
Example #3
Source File: Info.java    From galeb with Apache License 2.0 4 votes vote down vote up
public static int getPid() {
    final POSIX posix = POSIXFactory.getNativePOSIX();
    return posix.getpid();
}
 
Example #4
Source File: IOBenchmark.java    From bazel-buildfarm with Apache License 2.0 4 votes vote down vote up
@Setup(Level.Invocation)
public void setUp() throws Exception {
  testDir = ReadTestDir();
  testDirStr = testDir.toString();
  posix = POSIXFactory.getPOSIX(new DefaultPOSIXHandler(), true);
}