Only fork for peak building when necessary.

pull/3/head
Jonathan Moore Liles 2008-04-17 10:59:02 -05:00
parent c8b872ae41
commit 9cbc39addd
1 changed files with 3 additions and 2 deletions

View File

@ -268,9 +268,10 @@ Peaks::open ( void )
int fd;
if ( ! current() )
/* Build peaks asyncronously */
if ( ! fork() )
exit( make_peaks( 256 ) );
if ( ! fork() )
exit( make_peaks( 256 ) );
if ( ( fd = ::open( peakname( filename ), O_RDONLY ) ) < 0 )
return false;