      envp, DB_DUPSORT);
    if (ret != 0)
        goto err; </pre>
      <p>
    After that, our <code class="function">main()</code> function is unchanged,
    except that when we 
        <span>close the database,</span>
        
    we change the error message string so as to not reference the database filename.
  </p>
      <pre class="programlisting">    /* Initialize a pthread mutex. Used to help provide thread ids. */
    (void)pthread_mutex_init(&amp;thread_num_lock, NULL);

    /* Start the writer