- //fprintf(stderr, "Goodbye!\n");
- execl(g_fpu, g_fpu,NULL);
- fprintf(stderr, "Uh oh! %s\n", strerror(errno)); // We will never see this if something goes wrong... oh dear
- exit(errno); // Child exits here.
+ Debug("Child about to suppress stderr and exec vfpu");
+ dup2(open("/dev/null", O_APPEND), fileno(stderr)); //LALALA I AM NOT LISTENING TO YOUR STUPID ERRORS GHDL
+ if (vcd_output != NULL)
+ {
+ string s("--vcd=");
+ s += vcd_output;
+ execl(g_fpu, g_fpu, s.c_str(), NULL);
+ }
+ else
+ {
+ execl(g_fpu, g_fpu,NULL);
+ }
+ int err = errno; // Because errno will be set again by the next system call
+ Fatal("Uh oh! %s\n", strerror(err)); // We will never see this if something goes wrong... oh dear
+ exit(err); // Child exits here.