You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
package main
/*
#include <stdio.h>
void print() {
printf("yuhu\nyuhu");
}
*/
import "C"
func main() {
C.print()
}
What is the expected output?
yuhu
yuhu
What do you see instead?
yuhu
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
linux 64
Which version are you using? (run 'go version')
go version devel +2c2052f38c3c Tue Oct 09 09:55:57 2012 +0400
The text was updated successfully, but these errors were encountered:
A Go program exiting does not call C's atexit handlers, so stdout does not get flushed.
If you add C.fflush() to your program, you'll get both lines.
I think we probably want to keep the current behavior: we've worked hard to avoid atexit
handlers.
by eduard.castany:
The text was updated successfully, but these errors were encountered: