skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

mspawn_af.c (495B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/stralloc.h>
      4 #include <skalibs/env.h>
      5 #include <skalibs/cspawn.h>
      6 
      7 static stralloc modifsa = STRALLOC_ZERO ;
      8 
      9 int env_mspawn (char const *key, char const *value)
     10 {
     11   return env_addmodif(&modifsa, key, value) ;
     12 }
     13 
     14 pid_t mspawn_af (char const *file, char const *const *argv, char const *const *envp, size_t envlen, uint16_t flags, cspawn_fileaction const *fa, size_t n)
     15 {
     16   return mspawn_afm(file, argv, envp, envlen, modifsa.s, modifsa.len, flags, fa, n) ;
     17 }