mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-04 10:50:50 +02:00
fixes for glibc time/gettimeofday issue; fix issue with history file containing one line too few if saving timestamps; fix for signal arriving while displaying readline completions
This commit is contained in:
+11
-2
@@ -452,10 +452,19 @@ print_sig(void)
|
||||
struct tm *timetm;
|
||||
time_t clock;
|
||||
|
||||
datbuf[0] = '\0';
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
struct timeval tv;
|
||||
gettimeofday (&tv, 0);
|
||||
clock = tv.tv_sec;
|
||||
#else
|
||||
clock = time(NULL);
|
||||
#endif
|
||||
timetm = localtime(&clock);
|
||||
strftime(datbuf, MED_STR_MAX, TIMEFORMAT, timetm);
|
||||
datbuf[0] = '\0';
|
||||
if (timetm)
|
||||
strftime(datbuf, MED_STR_MAX, TIMEFORMAT, timetm);
|
||||
else
|
||||
strcpy (datbuf, "??");
|
||||
printf(signature, manpage, datbuf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user