mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Early check if output is writable in capture utility.
This commit is contained in:
parent
a1916a7c6c
commit
4a0926aa70
@ -1,5 +1,7 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
#else
|
||||||
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
@ -79,6 +81,15 @@ int main( int argc, char** argv )
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILE* test = fopen( output, "wb" );
|
||||||
|
if( !test )
|
||||||
|
{
|
||||||
|
printf( "Cannot open output file %s for writing!\n", output );
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
fclose( test );
|
||||||
|
unlink( output );
|
||||||
|
|
||||||
printf( "Connecting to %s:%i...", address, port );
|
printf( "Connecting to %s:%i...", address, port );
|
||||||
fflush( stdout );
|
fflush( stdout );
|
||||||
tracy::Worker worker( address, port );
|
tracy::Worker worker( address, port );
|
||||||
|
Loading…
Reference in New Issue
Block a user