VirtualBox

儲存庫 vbox 的更動 19796


忽略:
時間撮記:
2009-5-18 下午03:28:42 (16 年 以前)
作者:
vboxsync
svn:sync-xref-src-repo-rev:
47436
訊息:

tstXPCOMCCall: stop on POLLHUP

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Main/cbinding/tstXPCOMCCall.c

    r19768 r19796  
    349349                 */
    350350                PRInt32 fd;
     351                int ret;
    351352
    352353                printf("Entering event loop, PowerOff the machine to exit or press Ctrl-C to terminate\n");
     
    359360                    while (!g_fStop)
    360361                    {
    361                         struct pollfd   pfd;
     362                        struct pollfd pfd;
     363
    362364                        pfd.fd = fd;
    363365                        pfd.events = POLLIN | POLLERR | POLLHUP;
    364366                        pfd.revents = 0;
    365                         poll(&pfd, 1, 250);
    366                         rc = queue->vtbl->ProcessPendingEvents(queue);
     367
     368                        ret = poll(&pfd, 1, 250);
     369
     370                        if (ret <= 0)
     371                            continue;
     372
     373                        if (pfd.revents & POLLHUP)
     374                            g_fStop = 1;
     375
     376                        queue->vtbl->ProcessPendingEvents(queue);
    367377                    }
    368378                }
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette