66456

来自「神经网络昆斯林的新闻组分类2006」· 代码 · 共 31 行

TXT
31
字号
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!ogicse!decwrl!uunet!world!ojFrom: oj@world.std.com (Oliver Jones)Newsgroups: comp.windows.xSubject: Re: Q: How to avoid XOpenDisplay hang?Keywords: XlibMessage-ID: <C531A0.M3I@world.std.com>Date: 6 Apr 93 22:03:33 GMTArticle-I.D.: world.C531A0.M3IReferences: <C512xr.3oy@skates.gsfc.nasa.gov>Organization: Shawsheen SoftwareLines: 18In article <C512xr.3oy@skates.gsfc.nasa.gov> andy@ice.stx.com writes:>I'm writing 'xwall', a simple X version of 'wall', and I want it to>put a message up on each of a default list of displays.  The problem>is that XOpenDisplay hangs if one of the displays is currently>controlled by xdm (login screen). xdm does XGrabServer when it's running in secure mode (so do somescreen-locks).  There's really no simple way to tell this is the case.You can take xdm out of secure mode;  probably not too cool.You can wrap your call to XOpenDisplay in some code which solictsa future SIGALRM and longjmps past the XOpenDisplay from the signalhandler.  An example of this can be seen in the xdm sources.Note that longjmping out of XOpenDisplay probably causes a memoryleak;  any program functioning this way probably needs to exit() regularly.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?