Flush stdio on exit.
This commit is contained in:
parent
bef32c65a2
commit
af0d206752
|
@ -202,6 +202,15 @@ void msvcrt_init_io(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* free everything on process exit */
|
||||||
|
void msvcrt_free_io(void)
|
||||||
|
{
|
||||||
|
_fcloseall();
|
||||||
|
_close(0);
|
||||||
|
_close(1);
|
||||||
|
_close(2);
|
||||||
|
}
|
||||||
|
|
||||||
/* INTERNAL: Flush stdio file buffer */
|
/* INTERNAL: Flush stdio file buffer */
|
||||||
static int msvcrt_flush_buffer(MSVCRT_FILE* file)
|
static int msvcrt_flush_buffer(MSVCRT_FILE* file)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,13 +33,6 @@ static inline BOOL msvcrt_init_tls(void);
|
||||||
static inline BOOL msvcrt_free_tls(void);
|
static inline BOOL msvcrt_free_tls(void);
|
||||||
const char* msvcrt_get_reason(DWORD reason) WINE_UNUSED;
|
const char* msvcrt_get_reason(DWORD reason) WINE_UNUSED;
|
||||||
|
|
||||||
void msvcrt_init_io(void);
|
|
||||||
void msvcrt_init_console(void);
|
|
||||||
void msvcrt_free_console(void);
|
|
||||||
void msvcrt_init_args(void);
|
|
||||||
void msvcrt_free_args(void);
|
|
||||||
void msvcrt_init_vtables(void);
|
|
||||||
|
|
||||||
typedef void* (*MSVCRT_malloc_func)(unsigned int);
|
typedef void* (*MSVCRT_malloc_func)(unsigned int);
|
||||||
typedef void (*MSVCRT_free_func)(void*);
|
typedef void (*MSVCRT_free_func)(void*);
|
||||||
|
|
||||||
|
@ -82,7 +75,7 @@ BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
msvcrt_free_mt_locks();
|
msvcrt_free_mt_locks();
|
||||||
_fcloseall();
|
msvcrt_free_io();
|
||||||
msvcrt_free_console();
|
msvcrt_free_console();
|
||||||
msvcrt_free_args();
|
msvcrt_free_args();
|
||||||
if (!msvcrt_free_tls())
|
if (!msvcrt_free_tls())
|
||||||
|
|
|
@ -59,7 +59,15 @@ LPWSTR msvcrt_wstrndup(LPCWSTR, unsigned int);
|
||||||
int MSVCRT__set_new_mode(int mode);
|
int MSVCRT__set_new_mode(int mode);
|
||||||
|
|
||||||
/* Setup and teardown multi threaded locks */
|
/* Setup and teardown multi threaded locks */
|
||||||
void msvcrt_init_mt_locks(void);
|
extern void msvcrt_init_mt_locks(void);
|
||||||
void msvcrt_free_mt_locks(void);
|
extern void msvcrt_free_mt_locks(void);
|
||||||
|
|
||||||
|
extern void msvcrt_init_io(void);
|
||||||
|
extern void msvcrt_free_io(void);
|
||||||
|
extern void msvcrt_init_console(void);
|
||||||
|
extern void msvcrt_free_console(void);
|
||||||
|
extern void msvcrt_init_args(void);
|
||||||
|
extern void msvcrt_free_args(void);
|
||||||
|
extern void msvcrt_init_vtables(void);
|
||||||
|
|
||||||
#endif /* __WINE_MSVCRT_H */
|
#endif /* __WINE_MSVCRT_H */
|
||||||
|
|
Loading…
Reference in New Issue