void
mono_profiler_startup (const char *desc);
-/* the entry point */
+/**
+ * mono_profiler_startup:
+ * the entry point
+ */
void
mono_profiler_startup (const char *desc)
{
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;