问题描述
有没有什么办法让不能中断的程序(不间断程序)?到那个,我的意思是不能被任何信号终止一个进程,kill命令,或任何其他键组合
中的任何系统:Linux上,窗户等。
Is there any way to make a program that cannot be interrupted (an uninterrupted program)? By that, I mean a process that can't be terminated by any signal, kill command, or any other key combinations
in any System: Linux, windows etc.
首先,我想知道是否有可能或没有。如果是,什么高达扩展它是可能的?
First, I am interested to know whether it's possible or not. And if yes, upto what extend it is possible?
我主要是用C,C ++和Python code;但我不知道任何这些编程语言提供的这样的命令(S)的。
I mostly write code in C, C++, and python; but I don't know any of such command(s) available in these programming languages.
是否有可能与汇编语言,和放大器;怎么样 ?或者在高级语言c。与嵌入式汇编code(内联汇编)?
Is it possible with assembly language, & how ? Or in high level language c with embedded assembly code(inline assembly)?
我知道有些信号是开捕一些不喜欢SIGKILL和SIGSTOP。
I know some signals are catchable some are not like SIGKILL and SIGSTOP.
我记得,当我使用在Windows-XP工作,有些病毒无法甚至从任务管理器中结束。
所以我想一些解决方案是可行的低层次的语言。也许通过覆盖中断向量表。
I remember, when I was use to work on Windows-XP, some viruses couldn't be terminated even from Task Manager.
So I guess some solution is possible in low level languages. maybe by overriding Interrupt Vector Table.
我们可以写使用的TSR(挂钩)不间断的计划?因为当计算机重新启动,或者如果TSR明确地从内存中删除TSR只能删除。的我是正确的?的
Can we write an uninterrupted program using TSRs(Hooking)? Because TSR can only removed when the computer is rebooted or if the TSR is explicitly removed from memory. Am I correct?
我找不到在谷歌的任何事情。
I couldn't find any thing on Google.
推荐答案
好了,可能可以写一个程序,不适合大多数信号SIGQUIT一样回应,SIGHUP等 - 各种杀实际上是一种由内核发送到节目信号,一些信号意味着该程序被卡住,应该被杀死内核。
其实只是无法终止的程序是内核本身,甚至的init(PID 1)可以被封杀与HUP(这意味着重装)。
Well, possibly one can write a program which doesn't respond for most signals like SIGQUIT, SIGHUP etc. - each kind of "kill" is actually a kind of signal sent to program by kernel, some signals means for the kernel that program is stuck and should be killed.Actually the only unkillable program is kernel itself, even init ( PID 1 ) can be "killed" with HUP ( which means reload ).
了解更多有关的信号处理,从杀-l(列表信号)命令。
Learn more about signal handling, starting with kill -l ( list signals ) command.
关于视窗(立足于防病毒标记) - 这实际上适用于Linux太 - 如果你只需要运行一些杀毒软件的用户是无法跳过/关闭,它的权限问题,我的意思是系统启动的程序,以及非私自杀死它-administrative用户,将无法关闭/反正退出。我想在Windows lameusers世界各地将开始试图通过先关闭杀毒解决他们有任何问题,只是如果有可能:)
Regarding Windows ( basing on "antivirus" tag ) - which actually applies to linux too - if you just need to run some antivirus user is unable to skip/close, it's permission problem, I mean program started by system, and non-administrative user without permission to kill it, won't be able to close/exit it anyway. I guess lameusers on Windows all over the world would start "solving" any problems they have by trying to close antivirus first, just if it would be possible :)
这篇关于在Windows(或Linux)不间断的过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!