![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with exec command and file descriptors?? | rfourn | Shell Programming and Scripting | 1 | 07-18-2007 03:05 PM |
| File Descriptors + cron | matrixmadhan | UNIX for Advanced & Expert Users | 7 | 05-23-2007 10:53 AM |
| Sockets and File descriptors | gstlouis | High Level Programming | 3 | 12-12-2005 04:36 AM |
| File Descriptors | shibz | UNIX for Advanced & Expert Users | 3 | 12-18-2002 07:12 AM |
| File Descriptors | s_chordia | High Level Programming | 2 | 12-24-2001 08:45 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
file descriptors
i m trying to learn processes in unix and i've been reading this but i don't quite get it. its regarding file descriptors. : each is a part of file pointers, they point to another area. indexes into an Operating system maintained table called "file descriptor table". one table per process. may contain 20 entries called file pointers which point to an area of memory containing info about the opening of the file.
can someone comment on that, please! |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Short File Descriptors Tutorial
Here's a nice little (basic) tutorial: http://www.livefirelabs.com/unix_tip...3/06092003.htm.
This explains what "info" about a file they hold ... as for the more technical side, you'll have to dig deeper. Quote:
|
|
#3
|
||||
|
||||
|
user oombera,
thanks for your answer, yeah i see where are we heading from here. when i read it in my text, didn't make any sense. but when you said that "unix reads the files by using their respective numbers(file descriptors)" then i really understood the idea behind this. i have one more question though, what does this have to do with processes!? a25khan |
|
#4
|
|||
|
|||
|
Note that processes do not have a limit of 20 file descriptors
as suggested in your mail - rather the limit is OPEN_MAX. Here is the formal POSIX definition of a file descriptor: A per-process unique, non-negative integer used to identify an open file for the purpose of file access. The value of a file descriptor is from zero to OPEN_MAX. A process can have no more than OPEN_MAX file descriptors open simultaneously. Note also the difference between file DESCRIPTOR and file DESCRIPTION. From SUSv3 .... (Open) File Description A record of how a process or group of processes is accessing a file. Each file descriptor refers to exactly one open file description, but an open file description can be referred to by more than one file descriptor. The file offset, file status, and file access modes are attributes of an open file description. - Finnbarr |
|||
| Google The UNIX and Linux Forums |