in posix mode, don't notify about other terminated jobs if the jobs builtin is listing individual jobs; in posix mode, if `wait pid' finds pid in bgpids, remove it from there

This commit is contained in:
Chet Ramey
2024-09-20 14:47:56 -04:00
parent bc5ddc8698
commit 8d74195d7f
18 changed files with 2564 additions and 2166 deletions
+7 -1
View File
@@ -18,9 +18,13 @@
PATH=/bin:/usr/bin:/sbin:/usr/sbin
: ${TMPDIR:=/var/tmp}
export TDIR=${TMPDIR}/cwd-$$
export SDIR=${TMPDIR}/source-$$
mkdir -p $TDIR || { echo "$TDIR: cannot create" >&2; exit 1; }
mkdir -p $SDIR || { echo "$SDIR: cannot create" >&2; exit 1; }
cd ${TDIR} || { echo "${TDIR}: cannot cd" >&2; exit 1; }
FN=${SDIR}/improbable-filename
cat >$FN << EOF
@@ -30,7 +34,7 @@ cat >cwd-filename <<EOF
echo file in the current directory
EOF
trap 'rm -rf ${SDIR} ; rm -f cwd-filename' 0
trap 'rm -rf ${TDIR} ${SDIR}' 0
# not found in $PATH
. improbable-filename
@@ -60,3 +64,5 @@ ${THIS_SH} -c 'set -o posix ; . -p $SDIR cwd-filename' bash
# a null PATH argument is the same as "."
. -p '' cwd-filename
source -p '' cwd-filename
cd $OLDPWD