Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > WINDOWS PROGRAMMING (NNTP) > A simple question about file descriptors
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 6th May 01:33
dustin cox
External User
 
Posts: 1
Default A simple question about file descriptors


Once I close() a file descriptor can I get the same file descriptor back
(that is, the same integer) during the life of that particular process?

Thank you,
Dustin.
  Reply With Quote


  sponsored links


2 6th May 01:33
lev walkin
External User
 
Posts: 1
Default A simple question about file descriptors


yes. proof:

int ret;
close(0);
ret = dup(1);
assert(ret == 0);

--
Lev Walkin
vlm@lionet.info
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666