stop redis server

You can stop the Redis server by using the following command in C:

system("redis-cli shutdown");

This command will send a shutdown signal to the Redis server, causing it to stop.