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

#include <stdlib.h>
#include <skalibs/config.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 = getenv("PATH") ;
  if (!path) path = SKALIBS_DEFAULTPATH ;
  execvep(file, argv, envp, path) ;
}