mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-27 15:01:00 +01:00
40898: fix GDBM error handling
This commit is contained in:
parent
99fff8f15c
commit
135075e48c
2 changed files with 6 additions and 1 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
2017-05-24 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
|
* Sebastian: 40898: Src/Modules/db_gdbm.c: fix GDBM error handling.
|
||||||
|
|
||||||
2017-05-23 Peter Stephenson <p.stephenson@samsung.com>
|
2017-05-23 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* Stephane: 41142: Src/Modules/system.c: ensure close-on-exec is
|
* Stephane: 41142: Src/Modules/system.c: ensure close-on-exec is
|
||||||
|
|
|
||||||
|
|
@ -154,12 +154,13 @@ bin_ztie(char *nam, char **args, Options ops, UNUSED(int func))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gdbm_errno=0;
|
||||||
dbf = gdbm_open(resource_name, 0, read_write, 0666, 0);
|
dbf = gdbm_open(resource_name, 0, read_write, 0666, 0);
|
||||||
if(dbf) {
|
if(dbf) {
|
||||||
addmodulefd(gdbm_fdesc(dbf), FDT_MODULE);
|
addmodulefd(gdbm_fdesc(dbf), FDT_MODULE);
|
||||||
append_tied_name(pmname);
|
append_tied_name(pmname);
|
||||||
} else {
|
} else {
|
||||||
zwarnnam(nam, "error opening database file %s", resource_name);
|
zwarnnam(nam, "error opening database file %s (%s)", resource_name, gdbm_strerror(gdbm_errno));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue