GithubHelp home page GithubHelp logo

c-linux's Introduction

进程终止的两种方式:
1、异常终止   对一信号的接受而引发,默认动作为终止当前进程   可能产生核心转储  abort()   异步终止
2、正常终止
	_exit(status)指定了进程的终止状态  父进程可调用wait()获取该状态
		0表示“功成身退”   非0表示因异常而退出  不要大于128   
			信号终止时  $? 信号值与128相加  一般不使用_exit()退出
	exit()会在子函数中提前结束进程   通常都用exit结束进程
		exit()执行动作如下:
			a、调用退出处理程序(通过atexit()和on_exit()函数) 执行顺序与注册顺序相反
			b、刷新标准输入输出(stdio)缓冲区
			c、使用status的值执行_exit()系统调用
		调用main()的运行时函数(runtime)会将return n的返回值作为exit()的参数

c-linux's People

Contributors

youosun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.