I'm having problem with the printf function in C. It's just not printing the output, although buffering is disabled:
setbuf(stdout, NULL);
and
setvbuf(stdout, NULL, _IONBF, 0);
also I'm using fflush(stdout);
, but it still doesn't work.
This is the exact code:
int setup(){
//...
printf("Setup successful\n");
fflush(stdout);
return 0;
}
int main(int argc, char *argv[]){
setbuf(stdout, NULL);
setvbuf(stdout, NULL, _IONBF, 0);
setup();
//...
)
If the info helps; I'm on Linux (raspberry Pi).
Thanks in advance!