JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Make time localized too.
[spectrwm.git] / scrotwm.c
index b3a9077..1144742 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -3218,7 +3218,7 @@ search_do_resp(void)
 
        if ((resp = calloc(1, MAX_RESP_LEN + 1)) == NULL) {
                fprintf(stderr, "search: calloc\n");
-               return;
+               goto done;
        }
 
        rbytes = read(select_resp_pipe[0], resp, MAX_RESP_LEN);
@@ -3250,6 +3250,7 @@ search_do_resp(void)
                free(s);
        }
 done:
+       close(select_resp_pipe[0]);
        free(resp);
 }
 
@@ -6328,7 +6329,8 @@ main(int argc, char *argv[])
        start_argv = argv;
        fprintf(stderr, "Welcome to scrotwm V%s Build: %s\n",
            SCROTWM_VERSION, buildstr);
-       if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
+       if (!setlocale(LC_CTYPE, "") || !setlocale(LC_TIME, "") ||
+           !XSupportsLocale())
                warnx("no locale support");
 
        if (!(display = XOpenDisplay(0)))