Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

use of stringlist_t in shell methods

  • Loading branch information...
commit 5964fdff6cc6ab6ab66e7d41f94b9b7a98cb0e82 1 parent 45bab18
David Sugar authored

Showing 2 changed files with 20 additions and 0 deletions. Show diff stats Hide diff stats

  1. +16 0 corelib/shell.cpp
  2. +4 0 inc/ucommon/shell.h
16 corelib/shell.cpp
@@ -2910,3 +2910,19 @@ String shell::path(path_t id, const char *dir)
2910 2910 }
2911 2911 return result;
2912 2912 }
  2913 +
  2914 +shell::pid_t shell::spawn(const char *path, stringlist_t& list, char **envp, fd_t *stdio)
  2915 +{
  2916 + char **argv = stringpager::index(list);
  2917 + pid_t pid = spawn(path, argv, envp, stdio);
  2918 + stringpager::release(argv);
  2919 + return pid;
  2920 +}
  2921 +
  2922 +shell::pipe_t shell::spawn(const char *path, stringlist_t& list, pmode_t mode, size_t size, char **env)
  2923 +{
  2924 + char **argv = stringpager::index(list);
  2925 + pipe_t pio = spawn(path, argv, mode, size, env);
  2926 + stringpager::release(argv);
  2927 + return pio;
  2928 +}
4 inc/ucommon/shell.h
@@ -906,6 +906,8 @@ class __EXPORT shell : public mempager
906 906 */
907 907 static shell::pid_t spawn(const char *path, char **argv, char **env = NULL, fd_t *stdio = NULL);
908 908
  909 + static shell::pid_t spawn(const char *path, stringlist_t& argv, char **env = NULL, fd_t *stdio = NULL);
  910 +
909 911 /**
910 912 * Spawn a child pipe. If the executable path is a pure filename, then
911 913 * the $PATH will be used to find it. The argv array may be created from
@@ -919,6 +921,8 @@ class __EXPORT shell : public mempager
919 921 */
920 922 static shell::pipe_t spawn(const char *path, char **argv, pmode_t mode, size_t size = 512, char **env = NULL);
921 923
  924 + static shell::pipe_t spawn(const char *path, stringlist_t& argv, pmode_t mode, size_t size = 512, char **env = NULL);
  925 +
922 926 /**
923 927 * Set priority level and enable priority scheduler. This activates the
924 928 * realtime priority scheduler when a priority > 0 is requested for the

0 comments on commit 5964fdf

Please sign in to comment.
Something went wrong with that request. Please try again.