摘要: #include <iostream> #include <unistd.h> int main(int argc, char *argv[]) { pid_t pid = fork(); if (pid > 0) { std::cout << "In parent process." << std 阅读全文
posted @ 2024-02-26 16:16 南乡水 阅读(26) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <thread> int main(int argc, char *argv[]) { std::thread t = std::thread([]() { std::cout << "Hello world!" << std::endl; 阅读全文
posted @ 2024-02-26 16:00 南乡水 阅读(4) 评论(0) 推荐(0) 编辑