#include <precomp.h>
#include <tchar.h>
Go to the source code of this file.
◆ MK_STR
◆ sT
◆ _pclose()
Definition at line 175 of file popen.c.
176{
179
181
184 {
186 break;
187 }
189 {
192 return -1;
193 }
194
198
201 {
204 return -1;
205 }
206
209}
BOOL WINAPI GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
#define _munlock(locknum)
#define MSVCRT_CHECK_PMT(x)
void _dosmaperr(unsigned long oserrcode)
_CRTIMP int *__cdecl _errno(void)
struct popen_handle * popen_handles
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
DWORD WINAPI GetLastError(void)
◆ _tpopen()
Definition at line 38 of file popen.c.
39{
44 HANDLE hReadPipe, hWritePipe;
51
53
56
58 if (szComSpec ==
NULL)
59 {
60 szComSpec =
_T(
"cmd.exe");
61 }
62
66 else
68
70 if (szCmdLine ==
NULL)
71 {
73 }
74
81
83 {
86 }
87
88 memset(&ProcessInformation, 0,
sizeof(ProcessInformation));
91
96 }
97 else if ( *
md ==
'w' ) {
101 }
102
105
107 szCmdLine,
111 0,
114 &StartupInfo,
115 &ProcessInformation);
117
119 {
123 }
124
126
129 {
131 break;
132 }
134 {
138
143 }
145
147 {
150 }
151 else
152 {
155 }
156
160
162
165 if (ProcessInformation.
hProcess != 0)
168}
static struct sockaddr_in sa
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
BOOL WINAPI CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize)
unsigned split_oflags(unsigned oflags)
int msvcrt_alloc_fd(HANDLE hand, int flag)
#define STD_OUTPUT_HANDLE
#define STARTF_USESTDHANDLES
◆ msvcrt_alloc_fd()
Definition at line 343 of file file.c.
344{
347
348 TRACE(
":handle (%p) allocating fd (%d)\n", hand,
fd);
349
351 return -1;
352
356}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
void release_ioinfo(ioinfo *info)
static void msvcrt_set_fd(ioinfo *fdinfo, HANDLE hand, int flag)
static ioinfo * get_ioinfo_alloc(int *fd)
Referenced by _open_osfhandle(), _pipe(), _tpopen(), and _wsopen_s().
◆ msvcrt_free_popen_data()
◆ split_oflags()
Definition at line 1671 of file file.c.
1672{
1673 int wxflags = 0;
1674 unsigned unsupp;
1675
1685
1686 if ((unsupp = oflags & ~(
1693 )))
1694 ERR(
":unsupported oflags 0x%04x\n",unsupp);
1695
1696 return wxflags;
1697}
Referenced by _open_osfhandle(), _pipe(), _tpopen(), and _wsopen_s().
◆ popen_handles
◆ popen_handles_size
DWORD popen_handles_size = 0 |