xim: run server inside strans
This commit is contained in:
6
main.c
6
main.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user