Quando o thread principal sai, outros segmentos também saem?

Eu tenho um problema sobre segmentos principais e outros segmentos no mesmo processo. Quando a função principal retorna, os outros segmentos também saem? Estou confuso sobre isso.

Considere o seguinte código de teste:

void* test1(void *arg)
{
    unsigned int i = 0;
    while (1){
        i+=1;
    }
    return NULL;
}

void* test2(void *arg)
{
    long double i = 1.0;
    while (1){
        i *= 1.1;
    }
    return NULL;
}

void startThread ( void * (*run)(void*), void *arg) {
  pthread_t t;
  pthread_attr_t attr;
  if (pthread_attr_init(&attr) != 0
      || pthread_create(&t, &attr, run, arg) != 0
      || pthread_attr_destroy(&attr) != 0
      || pthread_detach(t) != 0) {
    printf("Unable to launch a thread\n");
    exit(1);
  }
}

int main()
{
    startThread(test1, NULL);
    startThread(test2, NULL);

    sleep(4);
    printf("main thread return.\n");

    return 0;
}

Quando o "segmento principal retornar". imprime, fio test1 e test2 também sair, alguém pode me dizer por quê?