27 lines
829 B
Diff
27 lines
829 B
Diff
---
|
|
sh.hist.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
--- sh.hist.c
|
|
+++ sh.hist.c 2019-11-29 14:28:04.960116108 +0000
|
|
@@ -1275,6 +1275,11 @@ rechist(Char *fname, int ref)
|
|
|
|
if (merge) {
|
|
jmp_buf_t osetexit;
|
|
+#if 0 /* We are using fcntl's F_SETLKW patch for locking
|
|
+ * therefore avoid dot file locking without holding
|
|
+ * a file descriptor as otherwise we migth not be
|
|
+ * able to open the history file after a crash or
|
|
+ * if a killall had been used during reboot. */
|
|
if (lock) {
|
|
#ifndef WINNT_NATIVE
|
|
char *lockpath = strsave(short2str(fname));
|
|
@@ -1284,6 +1289,7 @@ rechist(Char *fname, int ref)
|
|
cleanup_push(lockpath, dotlock_cleanup);
|
|
#endif
|
|
}
|
|
+#endif
|
|
getexit(osetexit);
|
|
if (setexit()) {
|
|
/* Read .history file, leave it's fd open for writing. */
|