2024-05-03 19:37:37 +02:00
|
|
|
setlocale() sets errno to ENOENT ...
|
|
|
|
|
|
|
|
open("/usr/lib/locale/de_DE.UTF-8/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
|
|
|
|
open("/usr/lib/locale/de_DE.utf8/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = 3
|
|
|
|
|
|
|
|
and this causes a problem later on (bsc#908516)
|
|
|
|
|
|
|
|
---
|
2024-10-01 08:51:58 +02:00
|
|
|
src/free.c | 5 +++++
|
2024-05-03 19:37:37 +02:00
|
|
|
1 file changed, 5 insertions(+)
|
|
|
|
|
2024-10-01 08:51:58 +02:00
|
|
|
--- src/free.c
|
|
|
|
+++ src/free.c 2022-10-20 13:33:28.880818112 +0000
|
|
|
|
@@ -208,6 +208,7 @@ int main(int argc, char **argv)
|
|
|
|
int c, flags = 0, unit_set = 0, rc = 0;
|
2024-05-03 19:37:37 +02:00
|
|
|
struct commandline_arguments args;
|
2024-10-01 08:51:58 +02:00
|
|
|
struct meminfo_info *mem_info = NULL;
|
2024-05-03 19:37:37 +02:00
|
|
|
+ int errsv;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* For long options that have no equivalent short option, use a
|
2024-10-01 08:51:58 +02:00
|
|
|
@@ -260,10 +261,12 @@ int main(int argc, char **argv)
|
2024-05-03 19:37:37 +02:00
|
|
|
#ifdef HAVE_PROGRAM_INVOCATION_NAME
|
|
|
|
program_invocation_name = program_invocation_short_name;
|
|
|
|
#endif
|
|
|
|
+ errsv = errno;
|
|
|
|
setlocale (LC_ALL, "");
|
|
|
|
bindtextdomain(PACKAGE, LOCALEDIR);
|
|
|
|
textdomain(PACKAGE);
|
|
|
|
atexit(close_stdout);
|
|
|
|
+ errno = errsv;
|
|
|
|
|
2024-10-01 08:51:58 +02:00
|
|
|
while ((c = getopt_long(argc, argv, "bkmghlLtvCc:ws:V", longopts, NULL)) != -1)
|
2024-05-03 19:37:37 +02:00
|
|
|
switch (c) {
|
2024-10-01 08:51:58 +02:00
|
|
|
@@ -336,11 +339,13 @@ int main(int argc, char **argv)
|
2024-05-03 19:37:37 +02:00
|
|
|
break;
|
|
|
|
case 's':
|
|
|
|
flags |= FREE_REPEAT;
|
|
|
|
+ errsv = errno;
|
|
|
|
errno = 0;
|
|
|
|
args.repeat_interval = (1000000 * strtod_nol_or_err(optarg, "seconds argument failed"));
|
|
|
|
if (args.repeat_interval < 1)
|
|
|
|
xerrx(EXIT_FAILURE,
|
|
|
|
_("seconds argument `%s' is not positive number"), optarg);
|
|
|
|
+ errno = errsv;
|
|
|
|
break;
|
|
|
|
case 'c':
|
|
|
|
flags |= FREE_REPEAT;
|