summaryrefslogtreecommitdiff
path: root/src/libstddjb/pathexec_run.c
blob: ff3211d8563e2557ef11d57776981ac2e12d0eeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <skalibs/config.h>
#include <skalibs/env.h>
#include <skalibs/posixplz.h>
#include <skalibs/djbunix.h>

void pathexec_run (char const *file, char const *const *argv, char const *const *envp)
{
  char const *path = env_get("PATH") ;
  if (!path) path = SKALIBS_DEFAULTPATH ;
  execvep(file, argv, envp, path) ;
}