 threads. */
    for (i = 0; i &lt; NUMWRITERS; i++)
        (void)pthread_create(
      &amp;writer_threads[i], NULL, (void *)writer_thread, (void *)dbp);

    /* Join the writers */
    for (i = 0; i &lt; NUMWRITERS; i++)
        (void)pthread_join(writer_threads[i], NULL);

err:
    /* Close our database handle, if it was opened. */
    if (dbp != NULL) {
        ret_t = dbp-&gt;close(dbp, 0);
        if (ret_t != 0) {
            <strong class="userinput"><code>fprintf(stderr, "%s database close failed.