On Sat, Jul 16, 2011 at 12:47 PM, Matthew Dempsky <[email protected]> wrote: > guenther@ thought this would be a good idea to do now, and oga@ > pointed out that POSIX says fdopendir(3) is supposed to check the > current file offset of the passed file descriptor. (I have *no* idea > how to portably utilize this feature, but I've tested that the diff > below behaves as expected.)
It's just like passing a file fd pre-positioned via fork+exec (which the shell does all the time), though the use case for passing a prepositioned directory fd does seem pretty limited. "Process the first N entries, then execute another program to process the next N"? Given the lack of ordering guarantees, it seems like you're stuck with that or "do something with the current entry". I guess this saves having to pass the filename separately... <shurg> > How's this look? ok guenther@
