-require_prog script
-#### Use minimal arguments to script(1), i.e., just the file in
-#### which to save the output. We do pipe input to script, which is
-#### discouraged by the NOTES and BUGS sections of its man page.
-#### But that seems to work.
+#### Run a command but don't wait for user input. script(1) seems to do
+#### what we want by not waiting when run in the background.
+run_without_input() {
+ #### Create a command to use as a shell for script.
+ cat >"${cmd}" <<EOF
+#! /bin/sh
+$*
+EOF
+ chmod +x "${cmd}"
+
+ if [ ${use_dash_S} -eq 1 ]; then
+ script -S "${cmd}" "$actual" >/dev/null &
+ else
+ SHELL="${cmd}" script "$actual" >/dev/null &
+ fi
+
+ wait $!
+}