元の書き込みのバッファを回復するにはどうすればよいですか?
size_t write(int fd, const void *buf, size_t count)
{
static size_t (*write_func)(int, const void *, size_t) = NULL;
/* get reference to original (libc provided) write */
if (!write_func)
{
write_func = (size_t(*)(int, const void *, size_t))
dlsym(RTLD_NEXT, "write");
}
return write_func(fd, buffer, sizeof (buffer));
}