linux进程后台运行方法nohup、setsid、&介绍
摘要:我们经常会碰到这样的问题,用 telnet/ssh 登录了远程的 Linux 服务器,运行了一些耗时较长的任务, 结果却由于网络的不稳定导致任务中途失败。如何让命令提交后不受本地关闭终端窗口/网络断开连接的干扰呢?下面举了一些例子, 您可以针对不同的场景选择不同的方式来处理这个问题。 场景: 如果只
阅读全文
posted @
2020-01-28 12:05
yeahle
阅读(565)
推荐(0)
/usr/bin/ld: cannot find -lxx
摘要:1. /usr/bin/ld: cannot find -lcrypto 2. /usr/bin/ld: cannot find -lssl sudo apt-get install libssl-dev
阅读全文
posted @
2020-01-20 07:59
yeahle
阅读(230)
推荐(0)
declaration of 'void* operator new [](size_t)' has a different exception specifier
摘要:Are you using C++11 or later? The original operator new() declarations in C++98 throwing: void* operator new (std::size_t size) throw (std::bad_alloc)
阅读全文
posted @
2020-01-20 07:39
yeahle
阅读(1393)
推荐(0)
libevent学习笔记1
摘要:event_base_loop函数流程图 Libevent的事件主循环主要是通过event_base_loop ()函数完成的,其主要操作如下面的流程图所示,event_base_loop所作的就是持续执行下面的循环。 int event_base_loop(struct event_base *b
阅读全文
posted @
2020-01-18 22:30
yeahle
阅读(236)
推荐(0)
线程的查看以及利用gdb调试多线程
摘要:1. 线程的查看 首先创建两个线程: #include <stdio.h> #include <unistd.h> #include <pthread.h> #include <stdlib.h> #include <string.h> void* pthread_run1(void* arg) {
阅读全文
posted @
2020-01-12 09:02
yeahle
阅读(2863)
推荐(0)
GCC内置宏
摘要:gcc -dM -E - < /dev/null 注释: -E选项指示 GCC 在预处理完毕之后即可停止 -dM 不做实际的预处理,仅仅列出所有#define的宏,这些宏大部分与体系结构和GNU相关,或来自所包含的头文件。 #程序输出太长,这里就不列出了 $gcc -E -dM hello.c 另外
阅读全文
posted @
2020-01-11 20:41
yeahle
阅读(697)
推荐(2)