diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-01-08 13:35:13 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-09 03:32:52 +0000 |
| commit | 2f75879bd6e77e6c4eafe21deadb583a9f1e9061 (patch) | |
| tree | ce293df15b94990ef4145895b21f922b9e8fec4b | |
| parent | 3f0745b4e3c0d2dbfb6a0c0e21467a5853c6a9e7 (diff) | |
| download | meta-virtualization-2f75879bd6e77e6c4eafe21deadb583a9f1e9061.tar.gz | |
vrunner: fix file descriptor close syntax for coproc
The syntax {SOCAT[0]}<&- is invalid - curly braces are for allocating
new file descriptors, not referencing existing ones. Use eval with
${SOCAT[0]} to properly close the coproc file descriptors.
Fixes: "SOCAT[0]: ambiguous redirect" error when using daemon mode.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rwxr-xr-x | recipes-containers/vcontainer/files/vrunner.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes-containers/vcontainer/files/vrunner.sh b/recipes-containers/vcontainer/files/vrunner.sh index c9950618..a2f7a216 100755 --- a/recipes-containers/vcontainer/files/vrunner.sh +++ b/recipes-containers/vcontainer/files/vrunner.sh | |||
| @@ -454,7 +454,7 @@ daemon_send() { | |||
| 454 | done | 454 | done |
| 455 | 455 | ||
| 456 | # Clean up - close FDs and kill socat | 456 | # Clean up - close FDs and kill socat |
| 457 | exec {SOCAT[0]}<&- {SOCAT[1]}>&- | 457 | eval "exec ${SOCAT[0]}<&- ${SOCAT[1]}>&-" |
| 458 | kill $SOCAT_PID 2>/dev/null || true | 458 | kill $SOCAT_PID 2>/dev/null || true |
| 459 | wait $SOCAT_PID 2>/dev/null || true | 459 | wait $SOCAT_PID 2>/dev/null || true |
| 460 | 460 | ||
