2014-12-06 13:45:37 +01: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)
|
|
|
|
|
|
|
|
---
|
2015-09-24 07:17:26 +02:00
|
|
|
free.c | 5 +++++
|
|
|
|
1 file changed, 5 insertions(+)
|
2014-12-06 13:45:37 +01:00
|
|
|
|
2015-02-06 10:44:35 +01:00
|
|
|
--- free.c
|
2022-04-14 17:23:21 +02:00
|
|
|
+++ free.c 2018-04-04 12:47:06.360757839 +0000
|
|
|
|
@@ -197,6 +197,7 @@ int main(int argc, char **argv)
|
|
|
|
{
|
2015-09-24 07:17:26 +02:00
|
|
|
int c, flags = 0, unit_set = 0;
|
2014-12-06 13:45:37 +01:00
|
|
|
struct commandline_arguments args;
|
|
|
|
+ int errsv;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* For long options that have no equivalent short option, use a
|
2022-04-14 17:23:21 +02:00
|
|
|
@@ -247,10 +248,12 @@ int main(int argc, char **argv)
|
2014-12-06 13:45:37 +01: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;
|
|
|
|
|
2022-04-14 17:23:21 +02:00
|
|
|
while ((c = getopt_long(argc, argv, "bkmghltCc:ws:V", longopts, NULL)) != -1)
|
2014-12-06 13:45:37 +01:00
|
|
|
switch (c) {
|
2022-04-14 17:23:21 +02:00
|
|
|
@@ -317,11 +320,13 @@ int main(int argc, char **argv)
|
2014-12-06 13:45:37 +01:00
|
|
|
break;
|
|
|
|
case 's':
|
|
|
|
flags |= FREE_REPEAT;
|
|
|
|
+ errsv = errno;
|
2015-09-24 07:17:26 +02:00
|
|
|
errno = 0;
|
2016-08-18 09:15:06 +02:00
|
|
|
args.repeat_interval = (1000000 * strtod_nol_or_err(optarg, "seconds argument failed"));
|
2014-12-06 13:45:37 +01:00
|
|
|
if (args.repeat_interval < 1)
|
|
|
|
xerrx(EXIT_FAILURE,
|
|
|
|
_("seconds argument `%s' is not positive number"), optarg);
|
|
|
|
+ errno = errsv;
|
|
|
|
break;
|
|
|
|
case 'c':
|
|
|
|
flags |= FREE_REPEAT;
|