diff options
| author | NRK <nrk@disroot.org> | 2022-10-28 23:17:06 +0600 |
|---|---|---|
| committer | NRK <nrk@disroot.org> | 2023-01-09 11:08:02 +0600 |
| commit | 16b966be3b6b63ad331d619df654ca1a2082974e (patch) | |
| tree | 3763a4d1e5908e6d44235e63ee5a9611cb284e31 | |
| parent | 49d11f0d1fae43ae1e5f61204ed051e889062767 (diff) | |
spawn(): search $PATH as well
makes this function more useful for other people writing patches such as
this: https://codeberg.org/nsxiv/nsxiv-extra/src/branch/master/patches/dmenu-search
| -rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -268,7 +268,7 @@ pid_t spawn(int *readfd, int *writefd, char *const argv[]) if (writefd != NULL && mkspawn_pipe(&fa, cmd, pfd_write, 0) < 0) goto err_close_readfd; - if ((err = posix_spawn(&pid, cmd, &fa, NULL, argv, environ)) != 0) { + if ((err = posix_spawnp(&pid, cmd, &fa, NULL, argv, environ)) != 0) { error(0, err, "spawn: %s", cmd); } else { if (readfd != NULL) |
