(#4925) - com_pipefile to create a named pipe for sending commands from other processes, patch by Chris Schwarz
This commit is contained in:
parent
a3def2744f
commit
3bf8ec2dab
6 changed files with 122 additions and 0 deletions
|
@ -247,6 +247,31 @@ qboolean Sys_Mkdir( const char *path )
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
Sys_Mkfifo
|
||||
==================
|
||||
*/
|
||||
FILE *Sys_Mkfifo( const char *ospath )
|
||||
{
|
||||
FILE *fifo;
|
||||
int result;
|
||||
int fn;
|
||||
|
||||
result = mkfifo( ospath, 0600 );
|
||||
if( result != 0 )
|
||||
return NULL;
|
||||
|
||||
fifo = fopen( ospath, "w+" );
|
||||
if( fifo )
|
||||
{
|
||||
fn = fileno( fifo );
|
||||
fcntl( fn, F_SETFL, O_NONBLOCK );
|
||||
}
|
||||
|
||||
return fifo;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
Sys_Cwd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue