On Thu, Oct 19 2017, Sebastian Benoit <[email protected]> wrote: > Jeremie Courreges-Anglas([email protected]) on 2017.10.19 00:36:00 +0200: >> >> This call was added along with the magic check, but it not actually >> needed: history_load already calls rewind(3). I feel like the magic >> check should also be in history_load(), so that a ksh process can >> recover at runtime from a binary->plaintext history file migration. >> Worth the trouble? > > unsure, without extra work (backport) only people who upgrade from 6.1 (and > earlier) to 6.3 or snap from sometime in summer to now would benefit, right?
I took a look and it seems a bit more involved than I initially thought, so I just abandoned the idea. >> ok for the diff below? > > yes ok benno Thanks, > >> Index: history.c >> =================================================================== >> RCS file: /d/cvs/src/bin/ksh/history.c,v >> retrieving revision 1.72 >> diff -u -p -p -u -r1.72 history.c >> --- history.c 18 Oct 2017 15:41:25 -0000 1.72 >> +++ history.c 18 Oct 2017 22:25:23 -0000 >> @@ -799,8 +799,6 @@ hist_init(Source *s) >> return; >> } >> >> - rewind(histfh); >> - >> history_load(s); >> >> history_lock(LOCK_UN); >> >> >> -- >> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE >> > -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
