xim: run server inside strans

This commit is contained in:
2026-08-14 16:16:27 +09:00
parent 08369e718e
commit 4e07699460
9 changed files with 394 additions and 341 deletions

6
main.c
View File

@@ -49,6 +49,8 @@ erealloc(void *p, ulong n)
void
threadmain(int argc, char **argv)
{
char *display;
if(argc != 2)
usage();
@@ -65,6 +67,10 @@ threadmain(int argc, char **argv)
die("can't create server worker");
if(proccreate(ibusthread, nil, 32768) < 0)
die("can't create IBus worker");
display = getenv("DISPLAY");
if(display != nil && display[0] != '\0' &&
proccreate(ximthread, nil, 32768) < 0)
fprint(2, "strans: xim: cannot create worker\n");
if(threadcreate(dictthread, nil, 16384) < 0)
die("can't create dictionary worker");
imthread(nil);