diff --git a/NEWS b/NEWS index 258481890..e2cbfab54 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,12 @@ For full details, see the git log at: https://github.com/ksh93/ksh/tree/1.0 Any uppercase BUG_* names are modernish shell bug IDs. +2022-06-28: + +- Fixed a bug that caused the <#((num)) or >#((num)) arithmetic seek + redirection operator to fail if used with file descriptor 0, 1 or 2 + connected to a block device. + 2022-06-22: - Fixed: 'echo' failed when used inside a command substitution that diff --git a/src/cmd/ksh93/include/version.h b/src/cmd/ksh93/include/version.h index 8f918ada4..6c331703f 100644 --- a/src/cmd/ksh93/include/version.h +++ b/src/cmd/ksh93/include/version.h @@ -23,7 +23,7 @@ #define SH_RELEASE_FORK "93u+m" /* only change if you develop a new ksh93 fork */ #define SH_RELEASE_SVER "1.0.0-beta.2" /* semantic version number: https://semver.org */ -#define SH_RELEASE_DATE "2022-06-22" /* must be in this format for $((.sh.version)) */ +#define SH_RELEASE_DATE "2022-06-28" /* 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. */ diff --git a/src/lib/libast/sfio/sfseek.c b/src/lib/libast/sfio/sfseek.c index 651cdee3e..271ad977a 100644 --- a/src/lib/libast/sfio/sfseek.c +++ b/src/lib/libast/sfio/sfseek.c @@ -87,9 +87,8 @@ Sfoff_t sfseek(Sfio_t* f, /* seek to a new location in this stream */ } if(f->extent < 0) - { /* let system call set errno */ - (void)SFSK(f,(Sfoff_t)0,SEEK_CUR,f->disc); - return (Sfoff_t)(-1); + { /* not seekable with sfio: let the system call either set errno or succeed */ + return SFSK(f,p,type,f->disc); } /* throw away ungetc data */