c/cpp code snippets of linux platform