摘要: #include #include #include static int count = 0;//静态全局变量int main(int argc , char **argv){ int id; id=fork(); if(id #include int main () { ... 阅读全文
posted @ 2014-05-15 20:17 南哥的天下 阅读(1591) 评论(0) 推荐(0)
摘要: 起因 今天在写东西的时候,用到了多线程。遇到了个问题: 子线程的异常,在父线程中无法捕获。 解决 问题代码 问题代码示例代码如下: 运行结果如下: 解决办法 通过查看资料:http://stackoverflow.com/questions/2829329/catch-a-threads-excep 阅读全文
posted @ 2014-05-15 20:10 南哥的天下 阅读(3084) 评论(0) 推荐(0)