[docs] Update formatting in mono-api-jitinternal.
[mono.git] / mono / profiler / mono-profiler-aot.c
index 05ed0758ed2cfff00dea1280523e4e3abc7495c9..384e624b64ea447806f8fc054b44443bbe2a6b43 100644 (file)
@@ -119,7 +119,10 @@ match_option (const char* p, const char *opt, char **rval)
 void
 mono_profiler_startup (const char *desc);
 
-/* the entry point */
+/**
+ * mono_profiler_startup:
+ * the entry point
+ */
 void
 mono_profiler_startup (const char *desc)
 {
@@ -368,7 +371,12 @@ prof_shutdown (MonoProfiler *prof)
 
        printf ("Creating output file: %s\n", prof->outfile_name);
 
-       outfile = fopen (prof->outfile_name, "w+");
+       if (prof->outfile_name [0] == '#') {
+               int fd = strtol (prof->outfile_name + 1, NULL, 10);
+               outfile = fdopen (fd, "a");
+       } else {
+               outfile = fopen (prof->outfile_name, "w+");
+       }
        if (!outfile) {
                fprintf (stderr, "Unable to create output file '%s': %s.\n", prof->outfile_name, strerror (errno));
                return;