[PLUG] Trying to learn low level Linux programming for cs201...
Fred James
fredjame at fredjame.cnc.net
Sat Jan 10 02:51:46 UTC 2009
Tim wrote:
> Hey Fred,
>
>
>> I'll hazard a guess - this is C, yes?
>> close(fpRead); and close(fpWrite); indicate that these are file
>> pointers, yes?
>> file pointers are declared as
>> FILE *fpRead;
>> FILE *fpWrite;
>> Am I anywhere near on track? Hope this helps
>>
>
> FYI-
>
> Actually FILE data structures and pointers are used in the libc wrappers
> to file I/O. If you want to use the lower-level system calls, which
> pretty much go straight to the kernel, you'd use simple integers to keep
> track of file descriptors. Some people prefer this because the libc
> interface is quite cumbersome and unsafe in many ways.
>
> cheers,
> tim
>
Tim
Could you elaborate, please, or point to such?
Regards
Fred James
PS: Sorry - I should narrow the scope a bit - I meant the "unsafe" part
- thank you.
More information about the PLUG
mailing list