• 4369阅读
  • 4回复

请问:已知进程ID,使用何类可以将该进程终止?? [复制链接]

上一主题 下一主题
离线mmxjun
 

只看楼主 倒序阅读 楼主  发表于: 2009-07-07
请问:已知进程ID,使用何类可以将该进程终止??
QProcess类好像没提供这样的函数
离线shiroki

只看该作者 1楼 发表于: 2009-07-08
qt没有提供这样的api , 你直接用系统提供的方法吧
--
shiro is White
ki is tree
http://www.cuteqt.com
论坛 http://www.cuteqt.com/bbs
博客 http://www.cuteqt.com/blog
博客镜像: http://sites.cuteqt.com/cuteqt
Linux/Qt/嵌入式讨论群 http://qun.qq.com/air/5699823
离线qindq

只看该作者 2楼 发表于: 2009-07-08
如果是windows下
OpenProcess()
TerminateProcess()
离线tsuibin

只看该作者 3楼 发表于: 2009-07-08
unix
kill -9 NO
离线tsuibin

只看该作者 4楼 发表于: 2009-07-08
SIGNALS
       The signals listed below may be available for use with kill.  When known constant, numbers
       and default behavior are shown.

       Name     Num   Action    Description
       0          0   n/a       exit code indicates if a signal may be sent
       ALRM      14   exit
       HUP        1   exit
       INT        2   exit
       KILL       9   exit      cannot be blocked
       PIPE      13   exit
       POLL           exit
       PROF           exit
       TERM      15   exit
       USR1           exit
       USR2           exit
       VTALRM         exit
       STKFLT         exit      might not be implemented
       PWR            ignore    might exit on some systems
       WINCH          ignore
       CHLD           ignore
       URG            ignore
       TSTP           stop      might interact with the shell
       TTIN           stop      might interact with the shell
       TTOU           stop      might interact with the shell
       STOP           stop      cannot be blocked
       CONT           restart   continue if stopped, otherwise ignore
       ABRT       6   core
       FPE        8   core
       ILL        4   core
       QUIT       3   core
       SEGV      11   core
       TRAP       5   core
       SYS            core      might not be implemented
       EMT            core      might not be implemented
       BUS            core      core dump might fail
       XCPU           core      core dump might fail
       XFSZ           core      core dump might fail
快速回复
限100 字节
 
上一个 下一个