main: initialize locale

This affects e.g. the clock module, which (by default) formats the
date according to the locale's preferred format.
This commit is contained in:
Daniel Eklöf 2019-01-19 20:50:02 +01:00
parent bfa9ce9970
commit 314b43b4f0

18
main.c
View file

@ -1,14 +1,14 @@
#include <assert.h>
#include <locale.h>
#include <poll.h>
#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <signal.h>
#include <threads.h>
#include <poll.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/eventfd.h>
@ -91,6 +91,8 @@ out:
int
main(int argc, const char *const *argv)
{
setlocale(LC_ALL, "");
const struct sigaction sa = {.sa_handler = &signal_handler};
sigaction(SIGINT, &sa, NULL);
sigaction(SIGTERM, &sa, NULL);