less graceful shutdown but avoid deadlocks
This commit is contained in:
parent
9689b580bd
commit
abe4cd41cb
1 changed files with 9 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ Screen *_screen;
|
||||||
|
|
||||||
int debuglockdisplay = 1;
|
int debuglockdisplay = 1;
|
||||||
|
|
||||||
|
/*
|
||||||
static void
|
static void
|
||||||
drawshutdown(void)
|
drawshutdown(void)
|
||||||
{
|
{
|
||||||
|
|
@ -23,6 +24,7 @@ drawshutdown(void)
|
||||||
closedisplay(d);
|
closedisplay(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
initdraw(void (*error)(Display*, char*), char *fontname, char *label)
|
initdraw(void (*error)(Display*, char*), char *fontname, char *label)
|
||||||
|
|
@ -89,7 +91,13 @@ initdraw(void (*error)(Display*, char*), char *fontname, char *label)
|
||||||
draw(screen, screen->r, display->white, nil, ZP);
|
draw(screen, screen->r, display->white, nil, ZP);
|
||||||
flushimage(display, 1);
|
flushimage(display, 1);
|
||||||
|
|
||||||
atexit(drawshutdown);
|
/*
|
||||||
|
* I don't see any reason to go away gracefully,
|
||||||
|
* and if some other proc exits holding the display
|
||||||
|
* lock, this atexit call never finishes.
|
||||||
|
*
|
||||||
|
* atexit(drawshutdown);
|
||||||
|
*/
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue