Changeset 4111 for trunk/packages/vizservers/vtkvis
- Timestamp:
- Jan 12, 2014, 2:48:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/RenderServer.cpp
r4108 r4111 43 43 44 44 int VtkVis::g_statsFile = -1; ///< Stats output file descriptor. 45 #define CLIENT_READ (3) 46 #define CLIENT_WRITE (4) 47 int VtkVis::g_fdIn = CLIENT_READ; ///< Input file descriptor 48 int VtkVis::g_fdOut = CLIENT_WRITE; ///< Output file descriptor 45 int VtkVis::g_fdIn = STDIN_FILENO; ///< Input file descriptor 46 int VtkVis::g_fdOut = STDOUT_FILENO; ///< Output file descriptor 49 47 FILE *VtkVis::g_fOut = NULL; ///< Output file handle 50 48 FILE *VtkVis::g_fLog = NULL; ///< Trace logging file handle … … 409 407 initService() 410 408 { 411 // Create a stream associated with the client read file descriptor. If 412 // we're not using a socket (fdopen of descriptor 4 will return NULL), 413 // then use descriptor 1 and stdout respectively. 409 // Create a stream associated with the output file descriptor 414 410 g_fOut = fdopen(g_fdOut, "w"); 415 // If running without socket, use stdout for debugging411 // If running without a socket, use stdout for debugging 416 412 if (g_fOut == NULL && g_fdOut != STDOUT_FILENO) { 417 413 g_fdOut = STDOUT_FILENO; … … 436 432 } 437 433 438 // Nanoscale automatically redirects stdout and stderr to log files.439 434 // open log and map stderr to log file 440 435 g_fLog = fopen(logName, "w"); 441 436 dup2(fileno(g_fLog), STDERR_FILENO); 437 // If we are writing to socket, map stdout to log 438 if (g_fdOut != STDOUT_FILENO) { 439 dup2(fileno(g_fLog), STDOUT_FILENO); 440 } 441 442 fflush(stdout); 442 443 443 444 // clean up malloc'd memory
Note: See TracChangeset
for help on using the changeset viewer.