Ejemplo n.º 1
0
Archivo: fcitx.c Proyecto: eguopt/fcitx
int main(int argc, char* argv[])
{
    char* localedir = fcitx_utils_get_fcitx_path("localedir");
    setlocale(LC_ALL, "");
    bindtextdomain("fcitx", localedir);
    free(localedir);
    bind_textdomain_codeset("fcitx", "UTF-8");
    textdomain("fcitx");
    if (pipe(selfpipe) < 0) {
        fprintf(stderr, "Could not create self-pipe.\n");
        exit(1);
    }
    fcntl(selfpipe[0], F_SETFL, O_NONBLOCK);
    fcntl(selfpipe[1], F_SETFL, O_NONBLOCK);

    SetMyExceptionHandler();

    int instanceCount = 1;

    sem_t sem;
    sem_init(&sem, 0, 0);

    instance = FcitxInstanceCreateWithFD(&sem, argc, argv, selfpipe[0]);
    WaitForEnd(&sem, instanceCount);

    if (instance->loadingFatalError) {
        return 1;
    }
    return 0;
}
Ejemplo n.º 2
0
 virtual ~TaskThread() { WaitForEnd(); }
Ejemplo n.º 3
0
CAnimateTimer::~CAnimateTimer()
{
	WaitForEnd(ANIMATE_EXIT_TIMEOUT);
}