What Survives The Exec

A process has fd 5 open on a log file at offset 4096 (opened without O_CLOEXEC, and nothing has set FD_CLOEXEC on it since), a SIGTERM handler installed with sigaction(), SIGPIPE set to SIG_IGN, and a 2 MB heap buffer full of parsed config. It then calls execve("/usr/bin/gzip", argv, envp), which succeeds.

Which of the following are still true in the process afterwards? More than one applies.

A

The process ID is unchanged

B

The 2 MB heap buffer still holds the parsed config

C

fd 5 is still open on the log file, still at offset 4096

D

SIGPIPE is still ignored

E

The SIGTERM handler still runs when SIGTERM arrives