When is the C language standard library function atexit called?

The

code is as follows:
void F1 (void) {

printf("Running f1.\n");

}

void f2 (void) {

printf("Running f2.\n");

}

int main () {

printf("Registering f1 and f2: ");

if(atexit(f1)||atexit(f2)){
    printf("failed.\n");
}
else{
    printf("done.\n");
    exit(0);
}

}
the running result is as follows:
Registering F1 and f2: done.
Running f2.
Running f1.
my question is:
when the program runs to if, how do I know the return value of the atexit function? I see that the instructions on the atexit function are all called when the program exits normally, but now that the program has not exited at the time of if judgment, how does the program judge?

C
Mar.03,2021

atexit simply registers a function that returns whether the registration was successful or not. The registered function will not run until the main function exits.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8c7a-69674.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8c7a-69674.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?