Hello community, here is the log from the commit of package schily for openSUSE:Factory checked in at 2019-02-28 21:23:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/schily (Old) and /work/SRC/openSUSE:Factory/.schily.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "schily" Thu Feb 28 21:23:34 2019 rev:9 rq:677814 version:unknown Changes: -------- --- /work/SRC/openSUSE:Factory/schily/schily.changes 2019-02-13 10:17:50.689347121 +0100 +++ /work/SRC/openSUSE:Factory/.schily.new.28833/schily.changes 2019-02-28 21:23:41.265927398 +0100 @@ -1,0 +2,7 @@ +Wed Feb 20 18:42:13 UTC 2019 - Jan Engelhardt <[email protected]> + +- Update to new upstream release 2019.02.18 + * star 1.6: Two more FIFO problems (mainly visible on Linux) + have been fixed. + +------------------------------------------------------------------- Old: ---- schily-2019-01-22.tar.bz2 New: ---- schily-2019-02-18.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ schily.spec ++++++ --- /var/tmp/diff_new_pack.7LRJXB/_old 2019-02-28 21:23:42.433927007 +0100 +++ /var/tmp/diff_new_pack.7LRJXB/_new 2019-02-28 21:23:42.433927007 +0100 @@ -17,17 +17,17 @@ # grep -r define.VERSION (sometimes also noted down in schily-%rver/AN-%rver) -%global box_version 2019.01.22 +%global box_version 2019.02.18 %global cdr_version 3.02~a10 %global sccs_version 5.09 %global smake_version 1.3 -%global star_version 1.5.4 +%global star_version 1.6 %global libfind_version 1.7 %global ved_version 1.7 -%define rver 2019-01-22 +%define rver 2019-02-18 Name: schily -Version: 2019.01.22 +Version: 2019.02.18 Release: 0 Summary: A collection of command-line utilities maintained by J.Schilling License: CDDL-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND HPND AND ISC @@ -464,7 +464,7 @@ # - To enable verbosity, use with CC=cc LDCC=cc DYNLD=cc. # - Not fully parallel safe, so stick to default. # -mycf="%optflags -O0 -ggdb3 -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1" +mycf="%optflags -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1" gmake RUNPATH="" LINKMODE=dynamic COPTOPT="$mycf" LDOPTX="" SCCS_BIN_PRE="" SCCS_HELP_PRE="" config all %install ++++++ schily-2019-01-22.tar.bz2 -> schily-2019-02-18.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/.links new/schily-2019-02-18/.links --- old/schily-2019-01-22/.links 2018-11-15 14:43:29.000000000 +0100 +++ new/schily-2019-02-18/.links 2019-02-11 12:32:56.000000000 +0100 @@ -237,6 +237,7 @@ ./psmake/streql.c ./psmake/strlcpy.c ./psmake/strncpy.c +./psmake/strnlen.c ./psmake/uname.c ./psmake/update.c ./psmake/version.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/AN-2019-02-18 new/schily-2019-02-18/AN-2019-02-18 --- old/schily-2019-01-22/AN-2019-02-18 1970-01-01 01:00:00.000000000 +0100 +++ new/schily-2019-02-18/AN-2019-02-18 2019-02-18 12:51:17.000000000 +0100 @@ -0,0 +1,243 @@ +New features with AN-2019-02-18: + +This is the first localization step for the schily source consolidation. Many +programs now (hopefully) call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries and the + missing programs + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to the tools should ***** +***** call all programs in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-tools 2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. If your smake is too old and aborts, ensure this + *** by calling: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4 + The recent smake version is smake-1.3 + + *** Due to the fact that schily-tools 2014-01-26 introduced + *** optimizations for the Schily version of SunPro Make, you + *** need at least the dmake version from 2018/01/11 with support + *** for the "export" directive to compile with this makefile system. + + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + BUG WARNING: Please never report bugs to Linux distributions as they + usually do not forward these bug reports upstream and as the + Linux distributions typically do not let skilled people check + the bugs. We did not hear about a FIFO problem in star for a + long time and since the problem that (on Linux) occurred once + every 6000-10000 tries did not happen on Solaris after + 10 million tries, it was not known otherwise. + +- smake (psmake): a missing link to libschily/strnlen.c has been added. + + Thanks to Rolf Dietze for reporting. + +- star: another similar has been fixed similat to what has been fixed + already in the 2019-01-22 release: + + An even less frequent FIFO problem (occurs once every 50 million + tries on fast multi CPU machines) has been identified. Star reports a + hard EOF on input even though the complete file with logical EOF has + been read and there is still input to process. In order to debug this + problem a debug message has been added to the code. + + With this debug message, it turned out, that this problem happened + because a context switch occurred in the FIFO read process after it did + see an empty FIFO and later, after the process was resumed, the + following check for the FIFO_MEOF flag did see EOF. We now first check + for the FIFO_MEOF flag and later for the amount of data inside as the + FIFO as FIFO_MEOF is set after the FIFO content has been updated and + thus a context switch is no longer able to cause a wrong assumption + about the content of the FIFO. + + We now did run 250 million tests without seeing another problem. + + If you still see this, please send a report. + +- star: Note that the debug output for this problem now has been + disabled. If you need to debug this, call: + + smake clean COPTX=-DFIFO_EOF_DEBUG all + + in the star directory. + +- star: The message "Sync pipe read error" is no longer printed when + the FIFO background process dies instead of sending a final wakeup. + This is needed since there is a possibility for a context switch in + the foreground process that can make it later wait for a wakeup while + the background process misses to see the wait flag and just exits. + +- star: In rare conditions (once every 2 million tries), a hang could + occur with "star -c" if the tar process fills the FIFO and sets the + EOF flag and then calls wait() to wait for the FIFO tape output + process. This happens in case that the tape output did not see the + EOF flag because it has undergone a context switch after it checked + for the not yet existing EOF flag and before waiting for a wakeup + from the tar FIFO fill process. + + Star now closes the sync pipes before calling wait() as this always + wakes up the waiting other side. + + We did run another 300 million tests for this condition and did not + see any problem now. + +- star: The version is now 1.6 + + Short overview for what changed since the last "stable" version: + + - Support for "infinitely" long path names has been added. + + - Support for comparing timestamps with nanosecond granularity + + - -secure-links has been made the default when extracting + archived (except when doing an incremental restore). + + - Added Support for NFSv4 ACLs on FreeBSD. Solaris has been + supported since 2013. + + - Added Support to archive SELinix attributes. + + - Allow to configure whether "star -fsync" is the default in + order to support filesystems that are slow with granted + transactions (like ZFS) or platforms that are genrally + slow with fsync() (like Linux). + + - Full UNICODE support has been added for tar headers. + + - Support for -zstd compression has been added. + + - Some rare FIFO problems have been fixed. + Note that we did recently run more than a billion tests to + verify the FIFO after we identified a method to trigger the + problem on Linux. + +- Bourne Shell: Another vfork() problem has been fixed. "trap cmd EXIT" + has incorrectly called "cmd" after a non-existing command was + called by the shell. This was a result of the shared data from vfork(). + + Thanks to Martijn Dekker for reporting. + +- Bourne Shell: A unit test case for the above bug has been added. + +- Bourne Shell: __growstak() now always uses realloc() on modern + platforms. This may speed up things up to 15%. + + Thanks to Jan Engelhardt for reporting. + + +- SCCS TODO: + + - Convert sccs.c to use -NSCCS in the back end programs instead + of converting g-file names from the command line into s.file + names in the frontend in order to forward s.file names to the + backend programs. Doing it this way allows us to have the SCCS + history files "off tree" in a separate directory tree starting + with ".sccs/" at the "project root" directory, as the related + code to convert path names is in libcomobj::bulkprepare(). + + - Add code to admin(1) and delta(1) to retrieve the list of + new or modified files in order to have all important code + for a "sccs commit" in a single program that does not need to + deal with ARG_MAX limitations. + + - Add code to admin(1), delta(1) and get(1) to maintain/understand + the changeset file. + + - Add code to libcomobj to understand the changeset file, + which is needed in order to e.g. know the file names and file + specific SIDs/state that correspond to a project global SID. + + - Add code to all programs to maintain a lock (for the file + $PROJECTHOME/.sccs/SCCS/s.changeset, that would be in the file + $PROJECTHOME/.sccs/SCCS/z.changeset) to maintain a project + global lock. + + - Find/verify a complete transactional model that allows to repair + complex changes to the set of files for a project that have + been aborted in the middle. The current idea is to create the + file $PROJECTHOME/.sccs/changeset with the deltas to the + changeset during a complex update operation. + + - Find a way to decide when to use SCCS v6 type history files. + For the project mode, this is needed in order to prevent + historic SCCS implementations to believe they could modify + files without knowing about project global locks. + + + + + +- Bourne Shell Missing features for POSIX compliance: + + - Support for $'...' quoting (this is not needed for the current + version of POSIX but for the next POSIX + version that will be named SUSv8). + The development of SUSv8 will start in + late 2016. + + We are now expecting the Bourne Shell to be fully POSIX compliant. + +- Bourne Shell further TODO list: + + - Finish loadable builtin support. + + - POSIX does not allow us to implement ". -h", so we will + add a "source" builtin to be able to implement "source -h" + +- The following builtins (that are available in bsh) are still missing in + the Bourne Shell: + + err echo with output going to stderr + glob echo with '\0' instead of ' ' between args + env a builtin version of /usr/bin/env + + The following bsh intrinsics are still missing in the Bourne Shell: + + - the restricted bsh has restriction features that + are missing in the Bourne shell. + + - source -h read file into history but do not execute + + and probably more features not yet identified to be bsh unique. + + + +Author: + +Joerg Schilling +Seestr. 110 +D-13353 Berlin +Germany + +Email: [email protected], [email protected] + +Please mail bugs and suggestions to me. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/psmake/MAKE-sh new/schily-2019-02-18/psmake/MAKE-sh --- old/schily-2019-01-22/psmake/MAKE-sh 2018-10-29 22:42:44.000000000 +0100 +++ new/schily-2019-02-18/psmake/MAKE-sh 2019-02-10 23:36:05.000000000 +0100 @@ -1,5 +1,5 @@ #!/bin/sh -#ident "@(#)MAKE-sh 1.24 18/10/29 " +#ident "@(#)MAKE-sh 1.25 19/02/10 " ############################################################################### # # The shell variables CFLAGS & LDFLAGS may be used to pass additional flags @@ -245,6 +245,7 @@ $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES strcatl.c $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES strlcpy.c $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES strncpy.c +$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES strnlen.c $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES streql.c $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES getargs.c $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES geterrno.c @@ -267,4 +268,4 @@ $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES fileseek.c $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES niread.c $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES niwrite.c -$CC $LF $LDFLAGS -o smake make.$o readfile.$o parse.$o update.$o rules.$o archconf.$o job.$o memory.$o astoi.$o astoll.$o comerr.$o error.$o eaccess.$o format.$o getexecpath.$o getnstimeofday.$o jsprintf.$o jssnprintf.$o saveargs.$o seterrno.$o strcatl.$o strlcpy.$o strncpy.$o streql.$o getargs.$o geterrno.$o movebytes.$o fillbytes.$o ovstrcpy.$o raisecond.$o rename.$o searchinpath.$o uname.$o file_raise.$o fileopen.$o fcons.$o cvmod.$o flag.$o flush.$o dat.$o filewrite.$o fileread.$o fileseek.$o niread.$o niwrite.$o +$CC $LF $LDFLAGS -o smake make.$o readfile.$o parse.$o update.$o rules.$o archconf.$o job.$o memory.$o astoi.$o astoll.$o comerr.$o error.$o eaccess.$o format.$o getexecpath.$o getnstimeofday.$o jsprintf.$o jssnprintf.$o saveargs.$o seterrno.$o strcatl.$o strlcpy.$o strncpy.$o strnlen.$o streql.$o getargs.$o geterrno.$o movebytes.$o fillbytes.$o ovstrcpy.$o raisecond.$o rename.$o searchinpath.$o uname.$o file_raise.$o fileopen.$o fcons.$o cvmod.$o flag.$o flush.$o dat.$o filewrite.$o fileread.$o fileseek.$o niread.$o niwrite.$o diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/psmake/Makefile new/schily-2019-02-18/psmake/Makefile --- old/schily-2019-01-22/psmake/Makefile 2018-01-15 00:40:37.000000000 +0100 +++ new/schily-2019-02-18/psmake/Makefile 2019-02-10 23:36:05.000000000 +0100 @@ -1,4 +1,4 @@ -# @(#)Makefile 1.9 18/01/15 Copyright 1999-2018 J. Schilling +# @(#)Makefile 1.10 19/02/10 Copyright 1999-2019 J. Schilling #CFLAGS= -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO -DNO_SYSINFO $(CDEFS) @@ -12,7 +12,7 @@ format.$o \ getexecpath.$o \ jsprintf.$o jssnprintf.$o \ - saveargs.$o strcatl.$o strlcpy.$o strncpy.$o \ + saveargs.$o strcatl.$o strlcpy.$o strncpy.$o strnlen.$o \ streql.$o getargs.$o geterrno.$o seterrno.$o \ movebytes.$o fillbytes.$o raisecond.$o rename.$o \ searchinpath.$o file_raise.$o \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/psmake/cpfiles new/schily-2019-02-18/psmake/cpfiles --- old/schily-2019-01-22/psmake/cpfiles 2018-10-29 22:51:35.000000000 +0100 +++ new/schily-2019-02-18/psmake/cpfiles 2019-02-10 23:36:05.000000000 +0100 @@ -1,5 +1,5 @@ #!/bin/sh -# @(#)cpfiles 1.32 18/10/29 Copyright 1999-2018 J. Schilling +# @(#)cpfiles 1.33 19/02/10 Copyright 1999-2019 J. Schilling cp='cp -p' smake=smake @@ -122,6 +122,7 @@ $cp ${incsrc}/${lib}/strcatl.c strcatl.c $cp ${incsrc}/${lib}/strlcpy.c strlcpy.c $cp ${incsrc}/${lib}/strncpy.c strncpy.c +$cp ${incsrc}/${lib}/strnlen.c strnlen.c $cp ${incsrc}/${lib}/streql.c streql.c $cp ${incsrc}/${lib}/fillbytes.c fillbytes.c $cp ${incsrc}/${lib}/getargs.c getargs.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/psmake/lnfiles new/schily-2019-02-18/psmake/lnfiles --- old/schily-2019-01-22/psmake/lnfiles 2018-10-29 22:45:56.000000000 +0100 +++ new/schily-2019-02-18/psmake/lnfiles 2019-02-10 23:36:05.000000000 +0100 @@ -1,5 +1,5 @@ #!/bin/sh -# @(#)lnfiles 1.32 18/10/29 Copyright 1999-2013 J. Schilling +# @(#)lnfiles 1.33 19/02/10 Copyright 1999-2019 J. Schilling cp='ln -s' smake=smake @@ -122,6 +122,7 @@ $cp ${incsrc}/${lib}/strcatl.c strcatl.c $cp ${incsrc}/${lib}/strlcpy.c strlcpy.c $cp ${incsrc}/${lib}/strncpy.c strncpy.c +$cp ${incsrc}/${lib}/strnlen.c strnlen.c $cp ${incsrc}/${lib}/streql.c streql.c $cp ${incsrc}/${lib}/fillbytes.c fillbytes.c $cp ${incsrc}/${lib}/getargs.c getargs.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/psmake/rmlinks new/schily-2019-02-18/psmake/rmlinks --- old/schily-2019-01-22/psmake/rmlinks 2018-10-29 22:44:44.000000000 +0100 +++ new/schily-2019-02-18/psmake/rmlinks 2019-02-10 23:36:05.000000000 +0100 @@ -1,5 +1,5 @@ #!/bin/sh -# @(#)rmlinks 1.29 18/10/29 Copyright 1999-2018 J. Schilling +# @(#)rmlinks 1.30 19/02/10 Copyright 1999-2019 J. Schilling rm -f archconf.c rm -f job.c @@ -95,6 +95,7 @@ rm -f strcatl.c rm -f strlcpy.c rm -f strncpy.c +rm -f strnlen.c rm -f streql.c rm -f fillbytes.c rm -f getargs.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/sh/defs.h new/schily-2019-02-18/sh/defs.h --- old/schily-2019-01-22/sh/defs.h 2018-11-11 17:41:19.000000000 +0100 +++ new/schily-2019-02-18/sh/defs.h 2019-02-05 00:33:41.000000000 +0100 @@ -37,9 +37,9 @@ #endif /* - * Copyright 2008-2018 J. Schilling + * Copyright 2008-2019 J. Schilling * - * @(#)defs.h 1.195 18/11/11 2008-2018 J. Schilling + * @(#)defs.h 1.196 19/02/05 2008-2019 J. Schilling */ /* @@ -83,7 +83,7 @@ #else #define ETEST ERROR /* historical test(1) error exit code */ #endif -#define SIGFAIL 2000 +#define SIGFAIL 2000 /* Default shell exit code on signal */ #define SIGFLG 0200 /* $? == SIGFLG + signo */ #define C_NOEXEC 126 /* Shell error/exit for exec error */ #define C_NOTFOUND 127 /* Shell error/exit for exec notfound */ @@ -1227,10 +1227,11 @@ #define MINTRAP 0 #define MAXTRAP NSIG -#define TRAPSET 2 -#define SIGSET 4 -#define SIGMOD 8 -#define SIGIGN 16 +#define TRAPSET 2 /* Mark incoming signal/fault */ +#define SIGSET 4 /* Mark fault w. no trapcmd */ +#define SIGMOD 8 /* Signal with trap(1) set */ +#define SIGIGN 16 /* Signal is ignored */ +#define SIGCLR 32 /* From oldsigs() w. vfork() */ extern BOOL trapnote; extern int traprecurse; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/sh/fault.c new/schily-2019-02-18/sh/fault.c --- old/schily-2019-01-22/sh/fault.c 2019-01-10 01:37:28.000000000 +0100 +++ new/schily-2019-02-18/sh/fault.c 2019-02-05 00:23:03.000000000 +0100 @@ -38,11 +38,11 @@ /* * Copyright 2008-2019 J. Schilling * - * @(#)fault.c 1.40 19/01/10 2008-2019 J. Schilling + * @(#)fault.c 1.41 19/02/05 2008-2019 J. Schilling */ #ifndef lint static UConst char sccsid[] = - "@(#)fault.c 1.40 19/01/10 2008-2019 J. Schilling"; + "@(#)fault.c 1.41 19/02/05 2008-2019 J. Schilling"; #endif /* @@ -267,7 +267,7 @@ struct excode savex; struct excode savrex; - if ((t = trapcom[0]) != NULL) { + if ((t = trapcom[0]) != NULL && (trapflg[0] & SIGCLR) == 0) { trapcom[0] = 0; /* Save exit value so trap handler will not change its val */ savxit = exitval; @@ -347,7 +347,7 @@ #endif } - if (trapcom[sig]) + if (trapcom[sig] && (trapflg[0] & SIGCLR) == 0) flag = TRAPSET; else if (flags & subsh) done(sig); @@ -470,8 +470,13 @@ while (i--) { t = trapcom[i]; f = trapflg[i]; - if (t == 0 || *t) + if (t == 0 || *t) { clrsig(i, dofree); +#ifdef HAVE_VFORK + if ((f & SIGMOD) && !dofree) + f |= SIGCLR; +#endif + } if (dofree) trapflg[i] = 0; else @@ -503,7 +508,7 @@ } else { handle(i, sigval[i]); } - trapflg[i] = f; + trapflg[i] = f & ~SIGCLR; } } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/sh/stak.c new/schily-2019-02-18/sh/stak.c --- old/schily-2019-01-22/sh/stak.c 2018-03-14 00:08:15.000000000 +0100 +++ new/schily-2019-02-18/sh/stak.c 2019-02-10 21:58:37.000000000 +0100 @@ -41,7 +41,7 @@ /* * Copyright Geoff Collyer 1987-2005 * - * @(#)stak.c 2.22 18/03/14 Copyright 2010-2018 J. Schilling + * @(#)stak.c 2.23 19/02/10 Copyright 2010-2019 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -57,7 +57,7 @@ #ifndef lint static UConst char sccsid[] = - "@(#)stak.c 2.22 18/03/14 Copyright 2010-2018 J. Schilling"; + "@(#)stak.c 2.23 19/02/10 Copyright 2010-2019 J. Schilling"; #endif @@ -598,6 +598,7 @@ TPRN(stakend - oldbsy); TPRS(" bytes; "); +#if !defined(HAVE_REALLOC_NULL) || defined(pdp11) if (incr < 0) { /* * V7 realloc wastes the memory given back when @@ -609,7 +610,7 @@ if (new == (unsigned char *)NIL) error(nostack); - if (staklen > 16) { + if (staklen >= 16) { memcpy(new, oldbsy, staklen); } else { register int amt = staklen; @@ -621,14 +622,17 @@ } free(oldbsy); oldbsy = new; - } else { + } else +#endif /* * get realloc to grow the stack to match the stack top */ if ((oldbsy = realloc(oldbsy, (unsigned)staklen)) == - (unsigned char *)NIL) + (unsigned char *)NIL) { error(nostack); - } + } + +#ifdef STAK_DEBUG TPRS("now @ "); TPRN((long)oldbsy); TPRS(" of "); @@ -644,6 +648,7 @@ TPRS(" bigger"); } TPRS(")\n"); +#endif stakend = oldbsy + staklen; /* see? points at the last byte */ staktop = oldbsy + topoff; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/sh/tests/shelltests/trap/trap.sh new/schily-2019-02-18/sh/tests/shelltests/trap/trap.sh --- old/schily-2019-01-22/sh/tests/shelltests/trap/trap.sh 2017-06-28 20:09:13.000000000 +0200 +++ new/schily-2019-02-18/sh/tests/shelltests/trap/trap.sh 2019-02-05 01:18:54.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # -# @(#)trap.sh 1.2 17/06/28 Copyright 2017 J. Schilling +# @(#)trap.sh 1.3 19/02/05 Copyright 2017-2019 J. Schilling # # Read test core functions @@ -26,4 +26,11 @@ docommand trap03 "$SHELL -c '(trap \"echo exited\" EXIT; $ECHO bla)'" 0 "bla\nexited\n" "" fi +# +# Check whether EXIT trap is not called with a non-existing command. +# This problem occurred with previous versions of the Bourne Shell +# when vfork() was used. +# +docommand trap04 "$SHELL -c 'trap \"echo TRAP\" EXIT; /dev/null/ne; trap - EXIT; echo end'" 0 "end\n" NONEMPTY + success diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/sh/version.h new/schily-2019-02-18/sh/version.h --- old/schily-2019-01-22/sh/version.h 2019-01-09 23:29:47.000000000 +0100 +++ new/schily-2019-02-18/sh/version.h 2019-02-05 00:37:01.000000000 +0100 @@ -1,4 +1,4 @@ -/* @(#)version.h 1.77 19/01/09 Copyright 2012-2019 J. Schilling */ +/* @(#)version.h 1.78 19/02/05 Copyright 2012-2019 J. Schilling */ /* * The version for the Bourne Shell @@ -17,5 +17,5 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#define VERSION_DATE "2019/01/09" +#define VERSION_DATE "2019/02/05" #define VERSION_STR "a+" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/star/buffer.c new/schily-2019-02-18/star/buffer.c --- old/schily-2019-01-22/star/buffer.c 2019-01-07 23:54:29.000000000 +0100 +++ new/schily-2019-02-18/star/buffer.c 2019-02-10 23:55:24.000000000 +0100 @@ -1,8 +1,8 @@ -/* @(#)buffer.c 1.188 19/01/07 Copyright 1985, 1995, 2001-2019 J. Schilling */ +/* @(#)buffer.c 1.189 19/02/10 Copyright 1985, 1995, 2001-2019 J. Schilling */ #include <schily/mconfig.h> #ifndef lint static UConst char sccsid[] = - "@(#)buffer.c 1.188 19/01/07 Copyright 1985, 1995, 2001-2019 J. Schilling"; + "@(#)buffer.c 1.189 19/02/10 Copyright 1985, 1995, 2001-2019 J. Schilling"; #endif /* * Buffer handling routines @@ -1451,7 +1451,8 @@ { #ifdef FIFO if (use_fifo) { - fifo_oflush(); + fifo_oflush(); /* Set FIFO_MEOF flag and wake other side */ + fifo_oclose(); /* Close sync pipe to finally wake other side */ wait(0); } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/star/fifo.c new/schily-2019-02-18/star/fifo.c --- old/schily-2019-01-22/star/fifo.c 2019-01-22 21:25:10.000000000 +0100 +++ new/schily-2019-02-18/star/fifo.c 2019-02-12 23:32:14.000000000 +0100 @@ -1,8 +1,8 @@ -/* @(#)fifo.c 1.95 19/01/22 Copyright 1989, 1994-2019 J. Schilling */ +/* @(#)fifo.c 1.98 19/02/12 Copyright 1989, 1994-2019 J. Schilling */ #include <schily/mconfig.h> #ifndef lint static UConst char sccsid[] = - "@(#)fifo.c 1.95 19/01/22 Copyright 1989, 1994-2019 J. Schilling"; + "@(#)fifo.c 1.98 19/02/12 Copyright 1989, 1994-2019 J. Schilling"; #endif /* * A "fifo" that uses shared memory between two processes @@ -152,6 +152,7 @@ EXPORT int fifo_iwait __PR((int amount)); EXPORT void fifo_owake __PR((int amount)); EXPORT void fifo_oflush __PR((void)); +EXPORT void fifo_oclose __PR((void)); EXPORT int fifo_owait __PR((int amount)); EXPORT void fifo_iwake __PR((int amt)); EXPORT void fifo_reelwake __PR((void)); @@ -416,13 +417,13 @@ if ((pid != 0) ^ cflag) { EDEBUG(("Get prozess: cflag: %d pid: %d\n", cflag, pid)); /* Get Prozess */ - close(mp->gpout); - close(mp->ppin); + (void) close(mp->gpout); + (void) close(mp->ppin); } else { EDEBUG(("Put prozess: cflag: %d pid: %d\n", cflag, pid)); /* Put Prozess */ - close(mp->gpin); - close(mp->ppout); + (void) close(mp->gpin); + (void) close(mp->ppout); } if (pid == 0) { @@ -513,6 +514,7 @@ error("full: %d\n", mp->full); error("maxfill: %d\n", mp->maxfill); error("moves: %d\n", mp->moves); + error("mbytes: %lld\n", mp->mbytes); #ifdef TEST error("wpin: %d\n", mp->wpin); error("wpout: %d\n", mp->wpout); @@ -557,6 +559,7 @@ int chan; { int ret; + int err = 0; unsigned char c = 0; waitchan = chan; @@ -565,12 +568,30 @@ ret = read(f, &c, 1); } while (ret < 0 && geterrno() == EINTR); waitchan = 0; + if (ret < 0) + err = geterrno(); - if (ret < 0 || (ret == 0 && pid)) { + if ((mp->pflags & FIFO_MEOF) && (ret == 0)) { + /* + * We come here in case that the other process that should send + * a wakeup died without sending the wakeup because a context + * switch on the waiting process (us) prevented us to set the + * wait flag in time. This is not a problem since we wake up + * from the EOF condition on the sync pipe. We behave as if we + * received a normal wakeup byte. + */ +#ifdef FIFO_EOF_DEBUG +extern BOOL cflag; + errmsg("Emulate received EOF wakeup on %s side.\n", + ((pid != 0) ^ cflag)? "get": "put"); +#endif + return ((int)c); + } + if (ret <= 0) { /* * If pid != 0, this is the foreground process */ - if ((mp->eflags & FIFO_EXIT) == 0) { + if (ret < 0 || (mp->eflags & FIFO_EXIT) == 0) { errmsg( "Sync pipe read error pid %d ret %d\n", pid, ret); @@ -579,31 +600,31 @@ mp->eflags, mp->pflags, mp->flags, chan); } - if ((mp->pflags & FIFO_MEOF) && (ret == 0 && pid)) { + if ((mp->eflags & FIFO_EXERRNO) != 0) { /* - * Try to work around a rare Linux kernel bug where - * read() returns 0 even though the other side of the - * pipe wrote a byte to the pipe before calling exit(). - * - * If this has been fully verified, move this code up - * past the read loop above to get a "silent" return. + * A previous error was seen, keep it. */ - errmsg("Trying to work around Kernel Pipe botch.\n"); - return ((int)c); - } - if ((mp->eflags & FIFO_EXERRNO) != 0) ret = mp->ferrno; - else - ret = 1; + } else { + /* + * Recent sync pipe read error. + * Signal error to forground process. + */ + mp->eflags |= FIFO_EXERRNO; + if (ret == 0) { + errmsgno(err, + "Sync pipe EOF error pid %d ret %d\n", + pid, ret); + } + if (err) + ret = err; + else + ret = EX_BAD; + mp->ferrno = ret; + } exprstats(ret); /* NOTREACHED */ } - if (ret == 0) { - /* - * this is the background process! - */ - exit(0); - } return ((int)c); } @@ -762,6 +783,25 @@ } } + +/* + * Data -> FIFO (Put side) + * + * final close of sync pipe + */ +EXPORT void +fifo_oclose() +{ + /* + * Close the pipe that is used to wakeup the Get side that might be + * waiting but we did not notice that mp->oblocked was set because + * it happened too late for us. + * Closing the pipe is an alternate way to wake up the Get side. + */ + fifo_exit(0); +} + + /* * FIFO -> Data (Get side) * @@ -788,25 +828,44 @@ */ if (rmp->pflags & FIFO_MEOF) { cnt = FIFO_AMOUNT(rmp); - if (cnt == 0) + if (cnt == 0) { return (cnt); + } } - cnt = FIFO_AMOUNT(rmp); - if (cnt < amount && (rmp->pflags & (FIFO_MEOF|FIFO_O_CHREEL)) == 0) { - rmp->empty++; - rmp->oblocked = TRUE; - EDEBUG(("o")); - c = sgetwait(rmp, 5); + /* + * We need to check rmp->pflags & FIFO_MEOF first, because FIFO_AMOUNT() + * gets updated before FIFO_MEOF. + */ + if ((rmp->pflags & (FIFO_MEOF|FIFO_O_CHREEL)) == 0) { cnt = FIFO_AMOUNT(rmp); + if (cnt < amount) { + /* + * If a context switch happens here, we may get a EOF + * condition while reading from the sync pipe because + * the other process did already fill up the last chunk + * into the FIFO and called exit(). There may be no way + * to detect that we expect a wakeup as rmp->oblocked + * may be set after the Put process exited. + */ + rmp->empty++; + rmp->oblocked = TRUE; + EDEBUG(("o")); + c = sgetwait(rmp, 5); + } } - if (cnt == 0 && (rmp->pflags & FIFO_O_CHREEL)) { - changetape(TRUE); - rmp->pflags &= ~FIFO_O_CHREEL; - EDEBUG(("T")); - sputwakeup(mp, 'T'); - goto again; + + if (rmp->pflags & FIFO_O_CHREEL) { + cnt = FIFO_AMOUNT(rmp); + if (cnt == 0) { + changetape(TRUE); + rmp->pflags &= ~FIFO_O_CHREEL; + EDEBUG(("T")); + sputwakeup(mp, 'T'); + goto again; + } } + cnt = FIFO_AMOUNT(rmp); if (rmp->maxfill < cnt) rmp->maxfill = cnt; @@ -814,7 +873,7 @@ if (cnt > rmp->obs) cnt = rmp->obs; - c = rmp->end - rmp->getptr; + c = rmp->end - rmp->getptr; /* Compute max. contig. content */ #ifdef CPIO_ONLY if (c < TBLOCK && c < cnt) { /* XXX Check for c < amount too? */ #else @@ -837,6 +896,11 @@ rmp->getptr = p; c = rmp->end - rmp->getptr; } + /* + * If there is more data in the FIFO than from the get ptr to the end + * of the FIFO and this is still more than the requested data, reduce + * "cnt" to what can be read in a single transfer. + */ if (cnt > c && c >= amount) cnt = c; @@ -878,7 +942,7 @@ if (rmp->getptr >= rmp->end) rmp->getptr = rmp->base; - if ((FIFO_AMOUNT(rmp) <= rmp->hiw) && rmp->iblocked) { + if (rmp->iblocked && (FIFO_AMOUNT(rmp) <= rmp->hiw)) { /* * Reset iblocked to make sure we send just one single * weakup event @@ -1010,13 +1074,13 @@ if ((pid != 0) ^ cflag) { EDEBUG(("Fifo_exit() from get prozess: cflag: %d pid: %d\n", cflag, pid)); /* Get Prozess */ - close(mp->gpin); - close(mp->ppout); + (void) close(mp->gpin); + (void) close(mp->ppout); } else { EDEBUG(("Fifo_exit() from put prozess: cflag: %d pid: %d\n", cflag, pid)); /* Put Prozess */ - close(mp->gpout); - close(mp->ppin); + (void) close(mp->gpout); + (void) close(mp->ppin); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/star/header.c new/schily-2019-02-18/star/header.c --- old/schily-2019-01-22/star/header.c 2019-01-22 01:03:37.000000000 +0100 +++ new/schily-2019-02-18/star/header.c 2019-02-05 22:03:12.000000000 +0100 @@ -1,8 +1,8 @@ -/* @(#)header.c 1.180 19/01/22 Copyright 1985, 1994-2019 J. Schilling */ +/* @(#)header.c 1.181 19/02/05 Copyright 1985, 1994-2019 J. Schilling */ #include <schily/mconfig.h> #ifndef lint static UConst char sccsid[] = - "@(#)header.c 1.180 19/01/22 Copyright 1985, 1994-2019 J. Schilling"; + "@(#)header.c 1.181 19/02/05 Copyright 1985, 1994-2019 J. Schilling"; #endif /* * Handling routines to read/write, parse/create @@ -884,8 +884,10 @@ errmsgno(EX_BAD, "Hard EOF on input, first EOF block is missing at %lld.\n", tblocks()); - if (use_fifo) /* Debug a rare Linuxproblem */ +#ifdef FIFO_EOF_DEBUG + if (use_fifo) /* Debug a rare EOF problem */ fifo_prmp(1); +#endif xstats.s_hardeof++; return (EOF); } @@ -1002,8 +1004,10 @@ errmsgno(EX_BAD, "Hard EOF on input, first EOF block is missing at %lld.\n", tblocks()); - if (use_fifo) /* Debug a rare Linuxproblem */ +#ifdef FIFO_EOF_DEBUG + if (use_fifo) /* Debug a rare EOF problem */ fifo_prmp(1); +#endif xstats.s_hardeof++; return (EOF); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/star/starsubs.h new/schily-2019-02-18/star/starsubs.h --- old/schily-2019-01-22/star/starsubs.h 2019-01-19 14:07:35.000000000 +0100 +++ new/schily-2019-02-18/star/starsubs.h 2019-02-11 00:00:01.000000000 +0100 @@ -1,4 +1,4 @@ -/* @(#)starsubs.h 1.133 19/01/19 Copyright 1996-2019 J. Schilling */ +/* @(#)starsubs.h 1.134 19/02/11 Copyright 1996-2019 J. Schilling */ /* * Prototypes for star subroutines * @@ -210,6 +210,7 @@ extern int fifo_iwait __PR((int amount)); extern void fifo_owake __PR((int amount)); extern void fifo_oflush __PR((void)); +extern void fifo_oclose __PR((void)); extern int fifo_owait __PR((int amount)); extern void fifo_iwake __PR((int amt)); extern void fifo_reelwake __PR((void)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schily-2019-01-22/star/version.c new/schily-2019-02-18/star/version.c --- old/schily-2019-01-22/star/version.c 2019-01-05 00:20:50.000000000 +0100 +++ new/schily-2019-02-18/star/version.c 2019-02-04 00:08:17.000000000 +0100 @@ -1,8 +1,8 @@ -/* @(#)version.c 1.3 19/01/05 Copyright 2018-2019 J. Schilling */ +/* @(#)version.c 1.4 19/02/04 Copyright 2018-2019 J. Schilling */ #include <schily/mconfig.h> #ifndef lint static UConst char sccsid[] = - "@(#)version.c 1.3 19/01/05 Copyright 2018-2019 J. Schilling"; + "@(#)version.c 1.4 19/02/04 Copyright 2018-2019 J. Schilling"; #endif /* * Copyright (c) 2018-2019 J. Schilling @@ -21,5 +21,5 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -char strvers[] = "1.5.4"; /* The pure version string */ -char dvers[] = "2019/01/05"; /* Version date */ +char strvers[] = "1.6"; /* The pure version string */ +char dvers[] = "2019/02/04"; /* Version date */
