On Thu, Oct 7, 2021 at 7:14 AM Hengqi Chen <hengqi.chen@xxxxxxxxx> wrote: > + > + sockaddr.sun_family = AF_UNIX; > + strcpy(sockaddr.sun_path, sock_path); please use strncpy. > + len = sizeof(sockaddr); > + unlink(sock_path); please use abstract socket to avoid unlink and potential race.