From: Martin Schwenke Date: Mon, 13 Jan 2020 23:58:15 +0000 (+1100) Subject: ctdb-tests: Enable job control when keeping stdin open X-Git-Tag: ldb-2.1.1~233 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea754bfdec9d537c500036d4d521bd41d34c0835;p=thirdparty%2Fsamba.git ctdb-tests: Enable job control when keeping stdin open POSIX says: If job control is disabled (see set, -m), the standard input for an asynchronous list, before any explicit redirections are performed, shall be considered to be assigned to a file that has the same properties as /dev/null. This shall not happen if job control is enabled. In all cases, explicit redirection of standard input shall override this activity. ctdbd is backgrounded at startup, so the above causes stdin to be redirected from /dev/null. Enable job control to work around this. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Tue Jan 28 11:24:35 UTC 2020 on sn-devel-184 --- diff --git a/ctdb/tests/local_daemons.sh b/ctdb/tests/local_daemons.sh index 2fa439f6c13..4a653224b23 100755 --- a/ctdb/tests/local_daemons.sh +++ b/ctdb/tests/local_daemons.sh @@ -307,7 +307,7 @@ local_daemons_ssh () if $_close_stdin ; then exec sh -c "$*" <&- else - exec sh -c "$*" + exec sh -m -c "$*" fi }