bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] shell_start_time


From: Pourko
Subject: [BUG] shell_start_time
Date: Mon, 29 Sep 2025 02:27:03 +0200 (CEST)

execute_cmd.c assumes that the value in time_t shell_start_time is in ticks,
as how one would get it from a call to the times() function. But for some
reason, shell.c puts seconds in it, rather than ticks.

Moreover, execute_cmd.c uses times() as a fallbask for !defined 
(HAVE_GETTIMEOFDAY),
yet shell.c uses a call to gettimeofday() to put those seconds in 
shell_start_time.

In execute_cmd.c this bug breaks things in "if (posixly_correct && nullcmd)".

--
Pourko




reply via email to

[Prev in Thread] Current Thread [Next in Thread]