VirtualBox

vbox的更動 58580 路徑 trunk/src/VBox/GuestHost


忽略:
時間撮記:
2015-11-5 下午02:18:59 (9 年 以前)
作者:
vboxsync
訊息:

bugref:8087: Additions/x11: support non-root X server: do not fork and exec in a shared library constructor, as this plays very badly with LD_PRELOAD.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/GuestHost/OpenGL/util/process.c

    r53726 r58580  
    1515#ifndef WINDOWS
    1616#include <unistd.h>
     17# ifdef VBOX
     18#  include <string.h>
     19# endif
    1720#else
    1821#pragma warning ( disable : 4127 )
     
    130133        }
    131134#else
     135#ifdef VBOX
     136    const char *pszExecName, *pszProgName;
     137#  ifdef SunOS
     138    pszExecName = getexecname();
     139#  else
     140    extern const char *__progname;
     141    pszExecName = __progname;
     142#  endif
     143    if (!pszExecName)
     144        pszExecName = "<unknown>";
     145    pszProgName = strrchr(pszExecName, '/');
     146    if (pszProgName && *(pszProgName + 1))
     147        pszProgName++;
     148    else
     149        pszProgName = pszExecName;
     150    strncpy(name, pszProgName, maxLen);
     151    name[maxLen - 1] = '\0';
     152# else
    132153        /* Unix:
    133154         * Call getpid() to get our process ID.
     
    149170        /* pipe output of ps to temp file */
    150171#ifndef SunOS
    151 # ifdef VBOX
    152         snprintf(command, sizeof(command), "ps > %s", tmp);
    153 # else
    154172        sprintf(command, "ps > %s", tmp);
    155 # endif
    156 #else
    157 # ifdef VBOX
    158         snprintf(command, sizeof(command), "ps -e -o 'pid tty time comm'> %s", tmp);
    159 # else
     173#else
    160174        sprintf(command, "ps -e -o 'pid tty time comm'> %s", tmp);
    161 # endif
    162175#endif
    163176        system(command);
     
    188201        }
    189202        remove(tmp);
     203# endif
    190204#endif
    191205}
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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