我对linux和这个论坛非常陌生。我正在为一个客户解决一个问题,他们有10+ Red Hat Linux5.5 64位服务器。他们希望在某些服务器上使用stop脚本(该脚本使用'kill -15')停止tomcat进程,该脚本运行良好,并在几秒钟内停止tomcat进程。在一些服务器上,有时它会很快停止,有时它会持续运行几分钟,最后客户不得不使用'kill -9‘命令来停止tomcat。日志不会显示任何内容。
你知道为什么这个脚本会有间歇性的行为吗?我们怎样才能在日志中捕获它呢?
尝试使用gdb调试程序时,它无法在OPENSSL_cpuid_setup中报告SIGILL。
对于这个简单的代码,我有相同的行为:
#include <openssl/ssl.h>
int main()
{
SSL_library_init();
}
它编译和运行良好,但从遵循回溯的gdb报告开始。
Program received signal SIGILL, Illegal instruction.
0xb6b2eb40 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
(gdb) where
我是否可以区分信号,直接传递给进程和通过调试器传递。
案例1:
$ ./process1
process1 (not ptraced)
//set up handler
alarm(5);
....
//signal is handled and I can parse handler parameters
案例2:
$ debugger1 ./process1
process1 (is ptraced by debugger1)
//set up handler
alarm(5);
...
//signal is catched by debugger1. It re
我想要一个无限的循环继续运行,并且只是暂时被一个杀死信号所打断。我试过了,SIGUSR1,SIGUSR2。他们似乎都停止了循环。我甚至尝试过SIGINFO,但是Linux不支持它。
#!/bin/bash
echo $$ > /tmp/pid # Save the pid
function do_something {
echo "I am doing stuff" #let's do this now, and go back to doing the thing that is to be done over and over again.
#ex
我正在linux机器上使用epoll编写一个网络程序,我从gdb获得了错误消息。
Program received signal SIGPIPE, Broken pipe.
[Switching to Thread 0x7ffff609a700 (LWP 19788)]
0x00007ffff7bcdb2d in write () from /lib/libpthread.so.0
(gdb)
(gdb) backtrace
#0 0x00007ffff7bcdb2d in write () from /lib/libpthread.so.0
#1 0x0000000000416bc8 i