c char *exec_name = strrchr(argv[0], '/');
if (exec_name == NULL) exec_name = argv[0];
server.sentinel_mode = checkForSentinelMode(argc,argv, exec_name);
initServerConfig();
ACLInit(); /* The ACL subsystem must be initialized ASAP because the
basic networking code and client creation depends on it. */
moduleInitModulesSystem();
connTypeInitialize();
***********************************************************、
replicaof masterip masterhostreplicaof masterip masterhost-replicaof masterip masterhost前几天读了redis双链表的实现,一个标准的双链表,但是也实现了存储任意类型,用void*,真的是奇淫技巧,可能是我见识少,感觉也能实现内核链表那种感觉,今天看来记录一下。
首先是结构定义
c/* Node, List, and Iterator are the only data structures used currently. */
typedef struct listNode { //指针和数据耦合在一起,非侵入式
struct listNode *prev;
struct listNode *next;
void *value;
} listNode;