Fix garbled filename output (#114)
This commit is contained in:
		
							parent
							
								
									de9e9edc4d
								
							
						
					
					
						commit
						2625e178df
					
				|  | @ -107,8 +107,8 @@ void outputCode( | ||||||
|   // Start a separate process to redirect the model output. I/O redirection
 |   // Start a separate process to redirect the model output. I/O redirection
 | ||||||
|   // changes will not be visible to the parent process.
 |   // changes will not be visible to the parent process.
 | ||||||
|   if (fork() == 0) { |   if (fork() == 0) { | ||||||
|     const char * tempFilename = (filename + extension).c_str(); |     string tempFilename = filename + extension; | ||||||
|     freopen(tempFilename, "w", stderr); |     freopen(tempFilename.c_str(), "w", stderr); | ||||||
|     module->dump(); |     module->dump(); | ||||||
|     fclose(stderr); |     fclose(stderr); | ||||||
|     exit(0); |     exit(0); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue