Yes I have made tests with my own C code to setup this information, But I think it has an impact only for my code and not for the behaviour of the 'dmaosd' binary. for this one I can't control its code.
for example with my code :
Code:
# include <stdio.h>
int main () {
char c;
FILE *file;
file=popen("run_all","r");
setvbuf(file,NULL,_IONBF,0);
if (file==NULL){
printf("Error: can t open file.\n");
return 1;
}
else {
printf("[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[file opened sucessfully. Contents: \n\n");
while (1) { /* ---------------*/
fflush(file);
c=fgetc(file);
if (c!=EOF){
printf("%c",c);
if (c=='\n') {
printf("[[[[[");
}
}
else {
break;
}
}/* -------------------------*/
printf("\n\n Now closing file ...\n");
fclose(file);
return 0;
}
}
as you can see I used setvbuf and a fflush, but it doesn't change the behaviour of the external 'dmaosd' binary, that delivers its output to my C code with its ............ buffer.
can you help ?
thanks
AirSeb