VirtualBox

Changeset 24339 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 4, 2009 3:13:23 PM (15 years ago)
Author:
vboxsync
Message:

VBoxTestOGL: on crashes, don't generate core dumps and redirect stderr to /dev/null

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/generic/OpenGLTestApp.cpp

    r24005 r24339  
    2727#include <iprt/stream.h>
    2828#ifdef RT_OS_WINDOWS
    29 #include <Windows.h>
     29# include <Windows.h>
     30#endif
     31#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2)
     32# include <sys/resource.h>
     33# include <fcntl.h>
     34# include <unistd.h>
    3035#endif
    3136
     
    3439#ifdef VBOX_WITH_CROGL
    3540
    36 extern "C" {
     41extern "C"
     42{
    3743  extern void * crSPULoad(void *, int, char *, char *, void *);
    3844  extern void crSPUUnloadChain(void *);
     
    7985int main(int argc, char **argv)
    8086{
    81     int rc=0;
     87    int rc = 0;
    8288
    8389    RTR3Init();
     90
     91#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2)
     92    /* This small test application might crash on some hosts. Do never
     93     * generate a core dump as most likely some OpenGL library is
     94     * responsible. */
     95    struct rlimit lim = { 0, 0 };
     96    setrlimit(RLIMIT_CORE, &lim);
     97
     98    /* Redirect stderr to /dev/null */
     99    int fd = open("/dev/null", O_WRONLY);
     100    if (fd != -1)
     101        dup2(fd, STDERR_FILENO);
     102#endif
    84103
    85104    if(argc < 2)
Note: See TracChangeset for help on using the changeset viewer.

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