Unix Programming - Re: fork/exec vs system

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2007 > Re: fork/exec vs system





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: fork/exec vs system
Rainer Weikusat

2007-01-25, 7:19 am

Casper H.S. Dik <Casper.Dik@Sun.COM> writes:
> Rainer Weikusat <rainer.weikusat@sncag.com> writes:
>
>
>
> While simple, it may not do what you want and it may do it slowly.
>
> - If the descriptor limit is dropped, sysconf()
> may return a number lower than the highest open descriptor


Using setrlimit that way is not portable behaviour for
UNIX(*)-systems, cf SUS, so, your statement should probably read that
'on certain versions of SunOS, namely ..., setrlimit could have been
used to limit the highest file descriptor available to the application
to one numerically smaller than the highest open file descriptor'.

> - sysconf() may return a ridicously large number; e.g.,
> Solaris allows basically "MAXINT" file descriptors for
> a process. A few billion calls to close does cost quite a bit
> of time.


That's an inherent problem of this approach.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com