• Advertisement

Archived

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

The DUP system call.

This topic is 5775 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement

  • Advertisement