/////////////////////////////////////////////////////////////////////////////
// Name: src/unix/utilsunx.cpp
-// Purpose: generic Unix implementation of many wx functions
+// Purpose: generic Unix implementation of many wx functions (for wxBase)
// Author: Vadim Zeitlin
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Vadim Zeitlin
tmReq.tv_nsec = (microseconds % 1000000) * 1000;
// we're not interested in remaining time nor in return value
- (void)nanosleep(&tmReq, (timespec *)NULL);
+ (void)nanosleep(&tmReq, NULL);
#elif defined(HAVE_USLEEP)
// uncomment this if you feel brave or if you are sure that your version
// of Solaris has a safe usleep() function but please notice that usleep()
int m_argc;
char **m_argv;
- DECLARE_NO_COPY_CLASS(ArgsArray)
+ wxDECLARE_NO_COPY_CLASS(ArgsArray);
};
} // anonymous namespace
}
else if ( pid == 0 ) // we're in child
{
- // These lines close the open file descriptors to to avoid any
- // input/output which might block the process or irritate the user. If
- // one wants proper IO for the subprocess, the right thing to do is to
- // start an xterm executing it.
- if ( !(flags & wxEXEC_SYNC) )
- {
- // FD_SETSIZE is unsigned under BSD, signed under other platforms
- // so we need a cast to avoid warnings on all platforms
- for ( int fd = 0; fd < (int)FD_SETSIZE; fd++ )
- {
- if ( fd == pipeIn[wxPipe::Read]
- || fd == pipeOut[wxPipe::Write]
- || fd == pipeErr[wxPipe::Write]
- || fd == (execData.pipeEndProcDetect)[wxPipe::Write] )
- {
- // don't close this one, we still need it
- continue;
- }
-
- // leave stderr opened too, it won't do any harm
- if ( fd != STDERR_FILENO )
- close(fd);
- }
- }
+ // NB: we used to close all the unused descriptors of the child here
+ // but this broke some programs which relied on e.g. FD 1 being
+ // always opened so don't do it any more, after all there doesn't
+ // seem to be any real problem with keeping them opened
#if !defined(__VMS) && !defined(__EMX__)
if ( flags & wxEXEC_MAKE_GROUP_LEADER )
machine.Contains(wxT("alpha"));
}
-// these functions are in mac/utils.cpp for wxMac
+// these functions are in src/osx/utilsexc_base.cpp for wxMac
#ifndef __WXMAC__
wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin)
protected:
const int m_fd;
- DECLARE_NO_COPY_CLASS(wxReadFDIOHandler)
+ wxDECLARE_NO_COPY_CLASS(wxReadFDIOHandler);
};
// class for monitoring our end of the process detection pipe, simply sets a
private:
bool m_terminated;
- DECLARE_NO_COPY_CLASS(wxEndHandler)
+ wxDECLARE_NO_COPY_CLASS(wxEndHandler);
};
#if HAS_PIPE_INPUT_STREAM
private:
wxStreamTempInputBuffer * const m_buf;
- DECLARE_NO_COPY_CLASS(wxRedirectedIOHandler)
+ wxDECLARE_NO_COPY_CLASS(wxRedirectedIOHandler);
};
#endif // HAS_PIPE_INPUT_STREAM