pexec

execute a program from standard input
git clone git://git.2f30.org/pexec.git
Log | Files | Refs

commit 24428f2778923eba49d1b10f6026fdd0a794d22b
parent 3b39dcfbbdcc324415e8991dd2d5c6619b8066c8
Author: sin <sin@2f30.org>
Date:   Fri, 23 Mar 2018 15:57:08 +0000

Use sizeof(buf) instead of BUFSIZ

Diffstat:
pexec.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pexec.c b/pexec.c @@ -92,7 +92,7 @@ pexec(int ifd, char *argv[], char *envp[]) if (fchmod(fd, 0755) < 0) err(1, "fchmod"); - while ((n = xread(ifd, buf, BUFSIZ)) > 0) + while ((n = xread(ifd, buf, sizeof(buf))) > 0) xwrite(fd, buf, n); if (fexecve(fd, argv, envp) < 0)