aboutsummaryrefslogtreecommitdiffstats
path: root/5
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2015-02-17 22:14:43 +0100
committerfilip <filip.komar@gmail.com>2015-02-17 22:14:43 +0100
commitbfdacfc6871e741d1bfd3f60dffa7a588e7e5bda (patch)
tree85ce65a55ba60626be10d6e536f4a6e569d2fa77 /5
parent04f8bcaa3192d12b24e2a3930f9db633c7d32b92 (diff)
downloadwww-bfdacfc6871e741d1bfd3f60dffa7a588e7e5bda.tar
www-bfdacfc6871e741d1bfd3f60dffa7a588e7e5bda.tar.gz
www-bfdacfc6871e741d1bfd3f60dffa7a588e7e5bda.tar.bz2
www-bfdacfc6871e741d1bfd3f60dffa7a588e7e5bda.tar.xz
www-bfdacfc6871e741d1bfd3f60dffa7a588e7e5bda.zip
l10n of wiki links
Diffstat (limited to '5')
0 files changed, 0 insertions, 0 deletions
ac99d987c49dc81aab14b6ff0a811a1a84adf2'>lib/exec_lib.c
blob: 3129224a0c9330546b4fecb71ec6b319042421d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <unistd.h>
#include <paths.h>

extern char **environ;

int __exec_shell(const char *file, char *const argv[]) {
  int i;

  for (i = 0; argv[i]; i++);

  {
    char *shell_argv[i + 1];
    shell_argv[0] = _PATH_BSHELL;
    shell_argv[1] = (char *) file;
    for (; i > 1; i--)
      shell_argv[i] = argv[i - 1];
    return execve(_PATH_BSHELL, shell_argv, environ);
  }
}