Safe Inside The Handler

You are writing a SIGTERM handler that must flush a counter to a file and terminate the process. Which of these calls are async-signal-safe according to POSIX, and therefore legal inside the handler? More than one applies.

A

exit(3)

B

printf(3)

C

kill(2)

D

write(2)

E

_exit(2)

F

malloc(3)