open(_, _, _) as o => o(path, flags, _) {{ return (strstr((char*)$(path), "/tmp/kitsune") && ((((long)$(flags)) & O_DIRECTORY) == 0)); }} -> {{ extern int kitsune_log_fd; kitsune_log_fd = $(ret); }} // Ignore log messages written by the leader write(fd, _, _) {{ extern int kitsune_log_fd; return (int)$(fd) == kitsune_log_fd; }} => nothing // ============================================ // Memcached 1.2.2 -> 1.2.3 nothing => rt_sigaction(2,_,_) nothing => rt_sigaction(12,_,_) // Memcached restarts the epoll structure after the update nothing => epoll_ctl(_,_,_,_) // Memcached's update prints garbage to stdout nothing => write(1,_,_) // ============================================ // Let log messages written by the follower just go ahead nothing => write(fd, _, _) {{ extern int kitsune_log_fd; return (int)$(fd) == kitsune_log_fd; }} nothing => open(path, _, _) {{ char buf[1024] = "/tmp/"; char pid[1024] = { '\0' }; int pid_n = syscall_getpid(); snprintf(pid, sizeof(pid), "%u", pid_n); // Terminate string correctly because this snprintf is incorrectly implemented for (size_t i = 0 ; i < sizeof(pid) ; i++) { if (pid_n > 0) { pid_n = pid_n / 10; } else { pid[i] = '\0'; break; } } memcpy(buf+strlen(buf), pid, strlen(pid) + 1); snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ".upd"); // Terminate string correctly because this snprintf is incorrectly implemented if (buf[strlen(buf)-1] < '0') buf[strlen(buf)-1] = '\0'; _nx_debug_dprintf(2, "%s\n", buf); return !strcmp(buf, (char*)$(path)); }}, fstat(_, _), brk(_) * , read(_, _, _) * , // unlink(_), open(_, _, _), fstat(_, _), read(_, _, _) * , close(_) nothing => getpid()