Krolyxon
Commit 16b966b

Branches

Refs →

nsxiv16b966b

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
Author
NRK
Date
2022-10-28 23:17 +0600
Committer
NRK · 2023-01-09 11:08 +0600
Parent
49d11f0
Commit
16b966be3b6b63ad331d619df654ca1a2082974e

+1 −1

1 file changed

  1. M util.c +1 −1
M util.c View
@@ -268,7 +268,7 @@ pid_t spawn(int *readfd, int *writefd, char *const argv[])
268268 if (writefd != NULL && mkspawn_pipe(&fa, cmd, pfd_write, 0) < 0)
269269 goto err_close_readfd;
270270
271− if ((err = posix_spawn(&pid, cmd, &fa, NULL, argv, environ)) != 0) {
271+ if ((err = posix_spawnp(&pid, cmd, &fa, NULL, argv, environ)) != 0) {
272272 error(0, err, "spawn: %s", cmd);
273273 } else {
274274 if (readfd != NULL)