本文整理了Java中jnr.posix.POSIX.posix_spawnp()
方法的一些代码示例,展示了POSIX.posix_spawnp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。POSIX.posix_spawnp()
方法的具体详情如下:
包路径:jnr.posix.POSIX
类名称:POSIX
方法名:posix_spawnp
暂无
代码示例来源:origin: com.github.jnr/jnr-posix
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
Collection<? extends SpawnAttribute> spawnAttributes,
Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
return posix().posix_spawnp(path, fileActions, spawnAttributes, argv, envp);
}
代码示例来源:origin: com.github.jnr/jnr-posix
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
Collection<? extends SpawnAttribute> spawnAttributes,
Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
try { return posix.posix_spawnp(path, fileActions, spawnAttributes, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
Collection<? extends SpawnAttribute> spawnAttributes,
Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
try { return posix.posix_spawnp(path, fileActions, spawnAttributes, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
Collection<? extends SpawnAttribute> spawnAttributes,
Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
try { return posix.posix_spawnp(path, fileActions, spawnAttributes, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
Collection<? extends SpawnAttribute> spawnAttributes,
Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
return posix().posix_spawnp(path, fileActions, spawnAttributes, argv, envp);
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
Collection<? extends SpawnAttribute> spawnAttributes,
Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
return posix().posix_spawnp(path, fileActions, spawnAttributes, argv, envp);
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
try { return posix.posix_spawnp(path, fileActions, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: com.github.jnr/jnr-posix
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
return posix().posix_spawnp(path, fileActions, argv, envp);
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
return posix().posix_spawnp(path, fileActions, argv, envp);
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
try { return posix.posix_spawnp(path, fileActions, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
return posix().posix_spawnp(path, fileActions, argv, envp);
}
代码示例来源:origin: com.cloudbees.util/jnr-unixsocket-nodep
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
return posix().posix_spawnp(path, fileActions, argv, envp);
}
代码示例来源:origin: com.github.jnr/jnr-posix
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
try { return posix.posix_spawnp(path, fileActions, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: com.cloudbees.util/jnr-unixsocket-nodep
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
try { return posix.posix_spawnp(path, fileActions, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: org.jruby/jruby-complete
long procSpawnSh(Ruby runtime, String str, ExecArg eargp) {
long status;
String shell = dlnFindExeR(runtime, "sh", eargp.path_env);
// System.out.println("before: " + shell + ", fa=" + eargp.fileActions + ", a=" + eargp.attributes + ", argv=" + Arrays.asList("sh", "-c", str));
status = runtime.getPosix().posix_spawnp(
shell != null ? shell : "/bin/sh",
eargp.fileActions,
eargp.attributes,
Arrays.asList("sh", "-c", str),
eargp.envp_str == null ? Collections.EMPTY_LIST : Arrays.asList(eargp.envp_str));
if (status == -1) errno = Errno.valueOf(runtime.getPosix().errno());
return status;
}
代码示例来源:origin: org.jruby/jruby-core
long procSpawnSh(Ruby runtime, String str, ExecArg eargp) {
long status;
String shell = dlnFindExeR(runtime, "sh", eargp.path_env);
// System.out.println("before: " + shell + ", fa=" + eargp.fileActions + ", a=" + eargp.attributes + ", argv=" + Arrays.asList("sh", "-c", str));
status = runtime.getPosix().posix_spawnp(
shell != null ? shell : "/bin/sh",
eargp.fileActions,
eargp.attributes,
Arrays.asList("sh", "-c", str),
eargp.envp_str == null ? Collections.EMPTY_LIST : Arrays.asList(eargp.envp_str));
if (status == -1) errno = Errno.valueOf(runtime.getPosix().errno());
return status;
}
代码示例来源:origin: org.jruby/jruby-core
long ret = runtime.getPosix().posix_spawnp(
"/bin/sh",
eargp.fileActions,
代码示例来源:origin: org.jruby/jruby-core
private long DO_SPAWN(Ruby runtime, ExecArg eargp, String cmd, String[] args, String[] envp) {
if (eargp.use_shell) {
return procSpawnSh(runtime, eargp, cmd, envp);
}
// System.out.println(Arrays.asList(
// cmd,
// eargp.fileActions,
// eargp.attributes,
// args == null ? Collections.EMPTY_LIST : Arrays.asList(args),
// envp == null ? Collections.EMPTY_LIST : Arrays.asList(envp)));
// MRI does not do this check, but posix_spawn does not reliably ENOENT for bad filenames like ''
if (cmd == null || cmd.length() == 0) {
errno = Errno.ENOENT;
return -1;
}
long ret = runtime.getPosix().posix_spawnp(
cmd,
eargp.fileActions,
eargp.attributes,
args == null ? Collections.EMPTY_LIST : Arrays.asList(args),
envp == null ? Collections.EMPTY_LIST : Arrays.asList(envp));
if (ret == -1) {
errno = Errno.valueOf(runtime.getPosix().errno());
}
return ret;
}
代码示例来源:origin: org.jruby/jruby-complete
private long DO_SPAWN(Ruby runtime, ExecArg eargp, String cmd, String[] args, String[] envp) {
if (eargp.use_shell) {
return procSpawnSh(runtime, eargp, cmd, envp);
}
// System.out.println(Arrays.asList(
// cmd,
// eargp.fileActions,
// eargp.attributes,
// args == null ? Collections.EMPTY_LIST : Arrays.asList(args),
// envp == null ? Collections.EMPTY_LIST : Arrays.asList(envp)));
// MRI does not do this check, but posix_spawn does not reliably ENOENT for bad filenames like ''
if (cmd == null || cmd.length() == 0) {
errno = Errno.ENOENT;
return -1;
}
long ret = runtime.getPosix().posix_spawnp(
cmd,
eargp.fileActions,
eargp.attributes,
args == null ? Collections.EMPTY_LIST : Arrays.asList(args),
envp == null ? Collections.EMPTY_LIST : Arrays.asList(envp));
if (ret == -1) {
errno = Errno.valueOf(runtime.getPosix().errno());
}
return ret;
}
代码示例来源:origin: com.github.jnr/jnr-process
long pid = posix.posix_spawnp(
command.get(0),
Arrays.asList(
内容来源于网络,如有侵权,请联系作者删除!