1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Fix $PPID for hashbangless script (re: 232b7bff)

I made a mistake in sh.reinit() which caused $PPID to be set to the
new process ID, not the parent process ID. This commit fixes it by
introducing, updating and using sh.current_ppid, so we continue to
minimise context switches due to getpid(2)/getppid(2) system calls.

Thanks to Geoff Clare for the report.
This commit is contained in:
Martijn Dekker 2022-07-27 13:26:34 +02:00
parent 592ce7415a
commit 48f78227a9
6 changed files with 23 additions and 9 deletions

View file

@ -22,8 +22,8 @@
#include <releaseflags.h>
#define SH_RELEASE_FORK "93u+m" /* only change if you develop a new ksh93 fork */
#define SH_RELEASE_SVER "1.0.0-rc.2" /* semantic version number: https://semver.org */
#define SH_RELEASE_DATE "2022-07-26" /* must be in this format for $((.sh.version)) */
#define SH_RELEASE_SVER "1.0.0-rc.3" /* semantic version number: https://semver.org */
#define SH_RELEASE_DATE "2022-07-27" /* must be in this format for $((.sh.version)) */
#define SH_RELEASE_CPYR "(c) 2020-2022 Contributors to ksh " SH_RELEASE_FORK
/* Scripts sometimes field-split ${.sh.version}, so don't change amount of whitespace. */