From e44e3d50dee26d12927baca188ad2a44a0135173 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Mon, 15 May 2023 13:30:18 -0400 Subject: complete initial implementation of nofork command substitution (${ command; }) --- lib/sh/anonfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sh/anonfile.c') diff --git a/lib/sh/anonfile.c b/lib/sh/anonfile.c index ded456b5..febc778f 100644 --- a/lib/sh/anonfile.c +++ b/lib/sh/anonfile.c @@ -47,13 +47,13 @@ anonunlink (const char *fn) } int -anonopen (const char *name, int flags) +anonopen (const char *name, int flags, char **fn) { int fd, flag; /* Heuristic */ flag = (name && *name == '/') ? MT_TEMPLATE : MT_USETMPDIR; - fd = sh_mktmpfd (name, flag|MT_USERANDOM|MT_READWRITE|MT_UNLINK, (char **)NULL); + fd = sh_mktmpfd (name, flag|MT_USERANDOM|MT_READWRITE|MT_UNLINK, fn); return fd; } -- cgit v1.2.1