mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
* Crash recovery for com_pipeFile (Lakitu7)
This commit is contained in:
parent
16b99e354b
commit
52ead6fa36
2 changed files with 10 additions and 3 deletions
|
@ -943,6 +943,8 @@ fileHandle_t FS_FCreateOpenPipeFile( const char *filename ) {
|
|||
}
|
||||
else
|
||||
{
|
||||
Com_Printf( S_COLOR_YELLOW "WARNING: Could not create new com_pipefile at %s. "
|
||||
"com_pipefile will not be used.\n", ospath );
|
||||
f = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -254,9 +254,14 @@ Sys_Mkfifo
|
|||
*/
|
||||
FILE *Sys_Mkfifo( const char *ospath )
|
||||
{
|
||||
FILE *fifo;
|
||||
int result;
|
||||
int fn;
|
||||
FILE *fifo;
|
||||
int result;
|
||||
int fn;
|
||||
struct stat buf;
|
||||
|
||||
// if file already exists AND is a pipefile, remove it
|
||||
if( !stat( ospath, &buf ) && S_ISFIFO( buf.st_mode ) )
|
||||
FS_Remove( ospath );
|
||||
|
||||
result = mkfifo( ospath, 0600 );
|
||||
if( result != 0 )
|
||||
|
|
Loading…
Reference in a new issue