libc: Fix environment passing in posix_spawnp(3)
commit8202da125af7f265528f7844bdc98d544a320bd1
authorzrj <rimvydas.jasinskas@gmail.com>
Mon, 3 Jan 2022 06:18:15 +0000 (3 06:18 +0000)
committerzrj <rimvydas.jasinskas@gmail.com>
Mon, 3 Jan 2022 06:36:01 +0000 (3 08:36 +0200)
treea7098decf56b2caebd5fd54afdbeeb6f34f84ec2
parent7be5ee01fc39e0f2c4273d2f1c4f5bc3d8ccfeda
libc: Fix environment passing in posix_spawnp(3)

 The execvPe() was always passing the parent process environment to
 children (a long standing bug).

 While there, replace the deprecated index(3) with strchr(3).

Reported-by: falsifian (breakage in hs-git-annex)
lib/libc/gen/exec.c