summaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-08-30 19:22:24 +0300
committerSergey Poznyakoff <gray@gnu.org>2021-09-03 13:23:50 +0300
commitd88abe096dbce5b00aa0d24b18718f5e978dd8fa (patch)
treee42f4a63818ef8433d34670ee2649ddd9c213013 /fuzz
parent4b603e6c021f359427e90768f1576edf3df78847 (diff)
downloadgdbm-d88abe096dbce5b00aa0d24b18718f5e978dd8fa.tar.gz
Change semantics of the errorexit variable.
The "errorexit" variable is a string variable with the same syntax as errormask. If a GDBM error is reported and the corresponding gdbm_errno value is listed in this variable, further script execution is aborted. Setting it as boolean value is equivalent to set errorexit="all". * src/gdbmshell.c (all handlers): Return a GDBMSHELL_* error code. (closedb): Unset the fd variable only after closing the database. (run_command): If handler reported GDBM error and gdbm_errno is listed in the errorexit variable, return 1 (which will cause YYABORT in parser). * src/gdbmtool.h (VAR_ERR_GDBM): New variable error code. (variable_has_errno): New function. (gdbm_error_is_masked): Rewrite using variable_has_errno. * src/gram.y: Abort if run_command or run_last_command return !0. Handle VAR_ERR_GDBM. * src/var.c (variable): New member: data. (errorexit variable): Change type to VART_STRING; install sethook and typeconv. (variable_unset): When unsetting string variable, free and reset its value. (cachesize_sethook,centfree_sethook) (coalesce_sethook): Return VAR_ERR_GDBM on gdbmshell_setopt error. (errormask_sethook): Keep the mask vector in the data member. Handle conversions from boolean. (errorexit_sethook): Call errormask_sethook unless in interactive session.
Diffstat (limited to 'fuzz')
0 files changed, 0 insertions, 0 deletions