lib/test-fork-safe-execvpe.sh: generalize "run" to "run0"
commit0a083bc835a26476d563c91b970c217cdb976ed6
authorLaszlo Ersek <lersek@redhat.com>
Wed, 22 Mar 2023 12:55:29 +0000 (22 13:55 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 22 Mar 2023 16:28:43 +0000 (22 17:28 +0100)
tree4572df3befeb39e3a6e6a7a7c468a2535caa87fa
parentf5a065aa3a9cc71854d5f6143a6c4e0c6717cf28
lib/test-fork-safe-execvpe.sh: generalize "run" to "run0"

It turns out that we'll need to put the generality of our
"test-fork-safe-execvpe" binary executable to use, in that it takes
separate "program-to-exec" and "argv0" (for the program-to-exec)
arguments.

Currently, the "run" function duplicates $2 to both "program-to-exec" and
"argv0", for "test-fork-safe-execvpe". Remove the duplication (expect the
caller to provide separate $2 and $3 arguments, respectively) and rename
"run" to "run0". At the same time, reimplement "run" as a simple wrapper
(i.e., with just the duplication) around "run0".

This patch is worth viewing with "git show --color-words" as well.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
lib/test-fork-safe-execvpe.sh