jnr.posix.POSIX.posix_spawnp()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(189)

本文整理了Java中jnr.posix.POSIX.posix_spawnp()方法的一些代码示例,展示了POSIX.posix_spawnp()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。POSIX.posix_spawnp()方法的具体详情如下:
包路径:jnr.posix.POSIX
类名称:POSIX
方法名:posix_spawnp

POSIX.posix_spawnp介绍

暂无

代码示例

代码示例来源:origin: com.github.jnr/jnr-posix

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
  2. Collection<? extends SpawnAttribute> spawnAttributes,
  3. Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  4. return posix().posix_spawnp(path, fileActions, spawnAttributes, argv, envp);
  5. }

代码示例来源:origin: com.github.jnr/jnr-posix

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
  2. Collection<? extends SpawnAttribute> spawnAttributes,
  3. Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  4. try { return posix.posix_spawnp(path, fileActions, spawnAttributes, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  5. }

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
  2. Collection<? extends SpawnAttribute> spawnAttributes,
  3. Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  4. try { return posix.posix_spawnp(path, fileActions, spawnAttributes, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  5. }

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
  2. Collection<? extends SpawnAttribute> spawnAttributes,
  3. Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  4. try { return posix.posix_spawnp(path, fileActions, spawnAttributes, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  5. }

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
  2. Collection<? extends SpawnAttribute> spawnAttributes,
  3. Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  4. return posix().posix_spawnp(path, fileActions, spawnAttributes, argv, envp);
  5. }

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions,
  2. Collection<? extends SpawnAttribute> spawnAttributes,
  3. Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  4. return posix().posix_spawnp(path, fileActions, spawnAttributes, argv, envp);
  5. }

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  2. try { return posix.posix_spawnp(path, fileActions, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  3. }

代码示例来源:origin: com.github.jnr/jnr-posix

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  2. return posix().posix_spawnp(path, fileActions, argv, envp);
  3. }

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  2. return posix().posix_spawnp(path, fileActions, argv, envp);
  3. }

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  2. try { return posix.posix_spawnp(path, fileActions, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  3. }

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  2. return posix().posix_spawnp(path, fileActions, argv, envp);
  3. }

代码示例来源:origin: com.cloudbees.util/jnr-unixsocket-nodep

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  2. return posix().posix_spawnp(path, fileActions, argv, envp);
  3. }

代码示例来源:origin: com.github.jnr/jnr-posix

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  2. try { return posix.posix_spawnp(path, fileActions, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  3. }

代码示例来源:origin: com.cloudbees.util/jnr-unixsocket-nodep

  1. public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) {
  2. try { return posix.posix_spawnp(path, fileActions, argv, envp); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  3. }

代码示例来源:origin: org.jruby/jruby-complete

  1. long procSpawnSh(Ruby runtime, String str, ExecArg eargp) {
  2. long status;
  3. String shell = dlnFindExeR(runtime, "sh", eargp.path_env);
  4. // System.out.println("before: " + shell + ", fa=" + eargp.fileActions + ", a=" + eargp.attributes + ", argv=" + Arrays.asList("sh", "-c", str));
  5. status = runtime.getPosix().posix_spawnp(
  6. shell != null ? shell : "/bin/sh",
  7. eargp.fileActions,
  8. eargp.attributes,
  9. Arrays.asList("sh", "-c", str),
  10. eargp.envp_str == null ? Collections.EMPTY_LIST : Arrays.asList(eargp.envp_str));
  11. if (status == -1) errno = Errno.valueOf(runtime.getPosix().errno());
  12. return status;
  13. }

代码示例来源:origin: org.jruby/jruby-core

  1. long procSpawnSh(Ruby runtime, String str, ExecArg eargp) {
  2. long status;
  3. String shell = dlnFindExeR(runtime, "sh", eargp.path_env);
  4. // System.out.println("before: " + shell + ", fa=" + eargp.fileActions + ", a=" + eargp.attributes + ", argv=" + Arrays.asList("sh", "-c", str));
  5. status = runtime.getPosix().posix_spawnp(
  6. shell != null ? shell : "/bin/sh",
  7. eargp.fileActions,
  8. eargp.attributes,
  9. Arrays.asList("sh", "-c", str),
  10. eargp.envp_str == null ? Collections.EMPTY_LIST : Arrays.asList(eargp.envp_str));
  11. if (status == -1) errno = Errno.valueOf(runtime.getPosix().errno());
  12. return status;
  13. }

代码示例来源:origin: org.jruby/jruby-core

  1. long ret = runtime.getPosix().posix_spawnp(
  2. "/bin/sh",
  3. eargp.fileActions,

代码示例来源:origin: org.jruby/jruby-core

  1. private long DO_SPAWN(Ruby runtime, ExecArg eargp, String cmd, String[] args, String[] envp) {
  2. if (eargp.use_shell) {
  3. return procSpawnSh(runtime, eargp, cmd, envp);
  4. }
  5. // System.out.println(Arrays.asList(
  6. // cmd,
  7. // eargp.fileActions,
  8. // eargp.attributes,
  9. // args == null ? Collections.EMPTY_LIST : Arrays.asList(args),
  10. // envp == null ? Collections.EMPTY_LIST : Arrays.asList(envp)));
  11. // MRI does not do this check, but posix_spawn does not reliably ENOENT for bad filenames like ''
  12. if (cmd == null || cmd.length() == 0) {
  13. errno = Errno.ENOENT;
  14. return -1;
  15. }
  16. long ret = runtime.getPosix().posix_spawnp(
  17. cmd,
  18. eargp.fileActions,
  19. eargp.attributes,
  20. args == null ? Collections.EMPTY_LIST : Arrays.asList(args),
  21. envp == null ? Collections.EMPTY_LIST : Arrays.asList(envp));
  22. if (ret == -1) {
  23. errno = Errno.valueOf(runtime.getPosix().errno());
  24. }
  25. return ret;
  26. }

代码示例来源:origin: org.jruby/jruby-complete

  1. private long DO_SPAWN(Ruby runtime, ExecArg eargp, String cmd, String[] args, String[] envp) {
  2. if (eargp.use_shell) {
  3. return procSpawnSh(runtime, eargp, cmd, envp);
  4. }
  5. // System.out.println(Arrays.asList(
  6. // cmd,
  7. // eargp.fileActions,
  8. // eargp.attributes,
  9. // args == null ? Collections.EMPTY_LIST : Arrays.asList(args),
  10. // envp == null ? Collections.EMPTY_LIST : Arrays.asList(envp)));
  11. // MRI does not do this check, but posix_spawn does not reliably ENOENT for bad filenames like ''
  12. if (cmd == null || cmd.length() == 0) {
  13. errno = Errno.ENOENT;
  14. return -1;
  15. }
  16. long ret = runtime.getPosix().posix_spawnp(
  17. cmd,
  18. eargp.fileActions,
  19. eargp.attributes,
  20. args == null ? Collections.EMPTY_LIST : Arrays.asList(args),
  21. envp == null ? Collections.EMPTY_LIST : Arrays.asList(envp));
  22. if (ret == -1) {
  23. errno = Errno.valueOf(runtime.getPosix().errno());
  24. }
  25. return ret;
  26. }

代码示例来源:origin: com.github.jnr/jnr-process

  1. long pid = posix.posix_spawnp(
  2. command.get(0),
  3. Arrays.asList(

相关文章

POSIX类方法