Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Force stdout to be line buffered.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 5 Oct 2011 08:43:31 +0000 (10:43 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 5 Oct 2011 09:41:20 +0000 (11:41 +0200)
Thus to avoid to have profiling messages in the middle of a line.

teshsuite/simdag/platforms/basic_parsing_test.c
teshsuite/simdag/platforms/flatifier.c

index 9b9a5be..7e3f5e3 100644 (file)
@@ -23,6 +23,8 @@ int main(int argc, char **argv)
   int route_size, i, j, k;
   int list_size;
 
   int route_size, i, j, k;
   int list_size;
 
+  setvbuf(stdout, NULL, _IOLBF, 0);
+
   SD_init(&argc, argv);
 
   /* creation of the environment */
   SD_init(&argc, argv);
 
   /* creation of the environment */
index 8b5fb69..e7321c9 100644 (file)
@@ -59,6 +59,8 @@ int main(int argc, char **argv)
   const SD_workstation_t *hosts;
   const SD_link_t *links;
 
   const SD_workstation_t *hosts;
   const SD_link_t *links;
 
+  setvbuf(stdout, NULL, _IOLBF, 0);
+
   SD_init(&argc, argv);
 
   platformFile = argv[1];
   SD_init(&argc, argv);
 
   platformFile = argv[1];