This topic is now archived and is closed to further replies.


The DUP system call.

Recommended Posts

msv    122
Hi -- I''m just learning about the fundamentals of programming.. What''s the point of DUP as a system call, does it just provide a function that copies a file descriptor (structure ?) with a given file position, to stop you needing to seek out that position if you closed the file, opened it again, and wanted to pick up where you left off ? .. or does it provide some other kind of advantage ? I assume a file descriptor is just a structure holding basic file information (.. not the same structure as the structure that STAT/FSTAT returns).. regarding the file being used and its file position, and I can''t see why a system call is necessary to duplicate it. - msv.

Share this post

Link to post
Share on other sites