Threads In C Language

F

Feedo

Guest
Hi,
Anyone has an idea about how to read or write a file in using a thread under the unix environment?


Thanx
 
You mean you want to fork() a program so it runs the in the background?
 
Thanx a lot, this seems very useful, however i'm trying to use the command Read(..,..,..) after opening a file. I want to know how to read the opened file!!
 
Its in that same tutorial as well.

/* read one block of 120 characters from the file stream, into 'buf'. */
/* (the third parameter to fread() is the number of blocks to read). */
char buf[120];
if (fread(buf, 120, 1, f_read) != 1) {
perror("fread");
}
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,623
Latest member
AndersonLo
Back