pid=49184
childid=`ps -ef|grep $pid|grep -v grep|awk '{printf " %s",$2 }'`
kill -9 $childid

linux 结束某个进程,并且结束子进程的更多相关文章

  1. .NET结束外部进程 C#结束外部进程

    原文发布时间为:2011-02-15 -- 来源于本人的百度文章 [由搬家工具导入] using System;namespace ConsoleApplication2{    class Prog ...

  2. linux下守护进程的创建

    最近在学习linux c编程 看到了守护进程的创建,感觉很好玩, 测试环境ubuntu 15.04 下面贴出测试代码 #include <stdio.h> #include <std ...

  3. Linux间的进程通信;以及子进程的创建

    "-----第六天-----------------------------------------------------------------------------" .版 ...

  4. [编程] C语言Linux系统编程-等待终止的子进程(僵死进程)

    1.等待终止的子进程(僵死进程): 如果一个子进程在父进程之前结束,内核会把子进程设置为一个特殊的状态,处于这种状态的进程称为僵死进程 当父进程获取了子进程的信息后,子进程才会消失. pid_t wa ...

  5. Python中进程无法结束的处理办法

    1.方法一    http://hi.baidu.com/javalang/item/72fabf2359a30b464799625e 也就是说当线程使用start方法运行起来后,只有当run方法运行 ...

  6. exit会结束一个进程

    #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include<stdlib.h ...

  7. linux下memcached的启动/结束的方式

    当前项目中,linux下memcached的启动/结束的方式 默认情况下memcached安装到/usr/local/bin下. 进入安装目录,启动memcached:/usr/local/memca ...

  8. Linux线程的几种结束方式

    Linux创建线程使用 int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) ...

  9. C程序的执行和当前进程的结束

    内核使程序执行的唯一方法,就是调用exec函数,这个函数又会启动一个C程序启动例程,这个启动例程是C程序的启动地址.负责调用main函数,并接受mainn函数的返回值. 使得进程结束的唯一方式是隐式的 ...

  10. IDEA惊天bug:进程已结束,退出代码-1073741819 (0xC0000005)

    由于昨天要写的文章没有写完,于是今天早上我四点半就"自然醒"了,心里面有事,睡觉也不安稳.洗漱完毕后,我打开电脑,正襟危坐,摆出一副要干架的态势,不能再拖了. 要写的文章中涉及到一 ...

随机推荐

  1. Httpd服务入门知识-Httpd服务常见配置案例之配置持久连接

    Httpd服务入门知识-Httpd服务常见配置案例之配置持久连接 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.查看默认的持久连接时间 [root@node101.yinzhe ...

  2. 基于python3环境使用bandersnatch搭建本地pypi源

     pip3 install bandersnatch # https://pypi.org/project/bandersnatch/#files 查询最新版本 wget https://files. ...

  3. gitlab修改IP地址及仓库地址

    将IP修改为192.168.10.100,操作方法 . 先修改本地的IP地址 vim /etc/sysconfig/network-scripts/ifcfg-eth0TYPE=EthernetBOO ...

  4. Dapper use Table Value Parameter in C# (Sql Server 数组参数)

    Dapper 也可以使用 数组参数 参考:Blog on Github Dapper 调用存储过程 :单个参数 static void Main(string[] args) { var connec ...

  5. Fire Balls 08——子弹的消失,当子弹击中自身时不可发射子弹

    版权申明: 本文原创首发于以下网站: 博客园『优梦创客』的空间:https://www.cnblogs.com/raymondking123 优梦创客的官方博客:https://91make.top ...

  6. Educational Codeforces Round 67 D. Subarray Sorting

    Educational Codeforces Round 67 D. Subarray Sorting 传送门 题意: 给出两个数组\(a,b\),现在可以对\(a\)数组进行任意次排序,问最后能否得 ...

  7. RemoveError: 'setuptools' is a dependency of conda and cannot be removed from conda's operating environment.

    今天用conda install 任何包都会出现这个错误: RemoveError: 'setuptools' is a dependency of conda and cannot be remov ...

  8. 一台服务器配置多个TOMCAT

    如果要在一台服务器上配置多个Tomcat,主要就是要避免Tomcat服务器的端口冲突的问题.只需要修改CATALINA_HOME\conf\server.xml中的启动端口和连接端口就OK了! 下面我 ...

  9. swift是面向对象、面向协议、高阶类型、灵活扩展、函数式编程语言

    swift是面向对象.面向协议.高阶类型.灵活扩展.函数式编程语言

  10. MySQL 练习题目 二刷 - 2019-11-4 5:55 am

    建表的过程 create table student( sid int not null primary key, sname ) not null, sborn date, ssex ) not n ...