Skip to content

Commit 8b3c1ff

Browse files
run entrypoint as bash background process, to overcome jail timeout on execution, as temporary w/a (#797)
1 parent a3bcd9f commit 8b3c1ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sudoexec/jcreate

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,10 @@ if [ -n "${from}" ]; then
436436
_md5_nover=$(${miscdir}/cbsd_md5 "${_path}")
437437
if [ "${from_md5}" = "${_md5_ver}" -o "${from_md5}" = "${_md5_nover}" ]; then
438438
_exec_start=$(${BUILDAH_CMD} --root ${workdir}/basejail/buildah inspect ${_image_id} \
439-
| ${JQ_CMD} -r '.OCIv1.config | (.Env + .Entrypoint + .Cmd) | map("\"" + . + "\"") | join(" ")' \
439+
| ${JQ_CMD} -r '.OCIv1.config | (.Env + ["sh", "-c"] + [(.Entrypoint + .Cmd + ["&"]) | join(" ")]) | map("\"" + . + "\"") | join(" ")' \
440440
)
441441

442-
jset jname=${jname} exec_start="/bin/env ${_exec_start}" exec_stop="/bin/kill -TERM 1"
442+
jset jname=${jname} exec_start="/bin/env ${_exec_start}" exec_stop="/bin/kill -TERM -1"
443443
break
444444
fi
445445
done

0 commit comments

Comments
 (0)