FTS
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > FTS




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    FTS  
brian


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-20-04 10:58 PM

I have migrated from linux to openBSD, and I have started to review the
source code.  For the command ls, the source code is using FTS to
traverse the directory structure.  The man page suggests that this (FTS)
might be added to the IEEE standard.

Can anyone here give me some history on FTS, and why I do not find it
even mentioned of it in the glibc documentation?

thanks,

brian





[ Post a follow-up to this message ]



    Re: FTS  
Lev Walkin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-20-04 10:58 PM

brian wrote:
> I have migrated from linux to openBSD, and I have started to review the
> source code.  For the command ls, the source code is using FTS to
> traverse the directory structure.  The man page suggests that this (FTS)
> might be added to the IEEE standard.
>
> Can anyone here give me some history on FTS, and why I do not find it
> even mentioned of it in the glibc documentation?

[url]http://lists.progeny.com/archive/progeny-security-announce/2001/msg00024.html[/url
]

"The fts() family of functions is a relatively recent innovation
in Unix, appearing first in 4.4BSD and later ported to the GNU C
library."



--
Lev Walkin
vlm@lionet.info





[ Post a follow-up to this message ]



    Re: FTS  
James Antill


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-21-04 07:48 AM

On Tue, 20 Jul 2004 14:35:28 -0600, brian wrote:

> I have migrated from linux to openBSD, and I have started to review the
> source code.  For the command ls, the source code is using FTS to
> traverse the directory structure.  The man page suggests that this (FTS)
> might be added to the IEEE standard.
>
> Can anyone here give me some history on FTS, and why I do not find it
> even mentioned of it in the glibc documentation?

It's old, the "std" now is to use nftw (it's in SuS -- as is the older
version ftw). However due to security/portability problems with all the
path walking libc code it tends to still be done by hand.

--
James Antill -- james@and.org
Need an efficient and powerful string library for C?
http://www.and.org/vstr/






[ Post a follow-up to this message ]



    Re: FTS  
brian


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-21-04 10:58 PM

James Antill wrote:
> On Tue, 20 Jul 2004 14:35:28 -0600, brian wrote:
>
> 
>
>
>  It's old, the "std" now is to use nftw (it's in SuS -- as is the older
> version ftw). However due to security/portability problems with all the
> path walking libc code it tends to still be done by hand.
>
Thanks.  I am walking through the source code of all the basic commands
in openBSD, and I was curious since I had never seen FTS before.  The
man page gave me pretty sufficient information as to it FTS's use, and
the source code for fts (fts.c) helped out a lot to.

So I should be looking at nftw to traverse paths now?  There are always
the system calls to, I guess.  I'm sure I will run into more old and odd
functions when I start to dig into the kernel and the IP stack.

thanks,

brian





[ Post a follow-up to this message ]



    Re: FTS  
William Ahern


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-21-04 10:58 PM

James Antill <james-netnews@and.org> wrote:
> On Tue, 20 Jul 2004 14:35:28 -0600, brian wrote:
 
>
>  It's old, the "std" now is to use nftw (it's in SuS -- as is the older
> version ftw). However due to security/portability problems with all the
> path walking libc code it tends to still be done by hand.

I thought fts was newer. From my OpenBSD man page for ftw(3):

These functions are provided for compatibility with legacy code.
New code should use the fts(3) functions.

Or is the chronology ftw(3) -> fts(3) -> nftw(3)?

Personally, I like the fts interface much better.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:02 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register