Ver Fonte

disable stdout buffering in debug mode

ncannasse há 7 anos atrás
pai
commit
da84d2828c
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      src/main.c

+ 2 - 0
src/main.c

@@ -152,6 +152,8 @@ int main(int argc, pchar *argv[]) {
 	if( !hl_module_init(ctx.m, &argc) )
 		return 3;
 	hl_code_free(ctx.code);
+	if( debug_port > 0 )
+		setbuf(stdout,NULL);
 	if( debug_port > 0 && !hl_module_debug(ctx.m,debug_port,debug_wait) ) {
 		fprintf(stderr,"Could not start debugger on port %d",debug_port);
 		return 4;