Hi all. The just of my program is that it catches a SIGINT signal and then writes something to a file. It writes it to the file the first time ok, but the second time it doesn't write. i even tried to fflush it and it still gives me the same problem.
here's a snipper of my code.
Could someone give me some suggestions on how to go about fixing it? Thanks!Code:printf("Record Created\n"); strcat(inputName," | "); strcat(address, " | "); strcat(phone, " | "); printf("%s\n",inputName); printf("%s\n",address); printf("%s\n",phone); fflush(in); fputs(inputName,in); fputs(address,in); fputs(phone,in); close(fildes[0]); write(fildes[1],"New Record",30); write(fildes[1],inputName,30); write(fildes[1],"Record Created",30); //close(fildes[1]); fflush(in);



LinkBack URL
About LinkBacks


