Unix中的zombie进程和orphan进程

Unix中子进程退出后,如果父进程没有使用wait()函数获得子进程的退出状态,则子进程的相关信息仍然会在系统的进程表里占用一席之地,这时的子进程称之为zombie进程。如果父进程先于子进程退出,这时的子进程称之为orphan进程,而init进程则会变成orphan进程的父进程。init进程会定期处理父进程是initzombie进程。

参考资料:
Zombie process
Zombie process vs Orphan process

Linux系统中locale相关的笔记

 下列笔记摘自The Linux programming interface

(1)

The actual locales that are defined on a system can vary. SUSv3 doesn’t make any requirements about this, except that a standard locale called POSIX (and synonymously, C, a name that exists for historical reasons) must be defined. This locale mirrors the historical behavior of UNIX systems. Thus, it is based on an ASCII character set, and uses English for names of days and months, and for yes/no responses. The monetary and numeric components of this locale are undefined.

The locale command displays information about the current locale environment (within the shell). The command locale –a lists the full set of locales defined on the system.

(2)

There are two different methods of setting the locale using setlocale(). The locale argument may be a string specifying one of the locales defined on the system (i.e., the name of one of the subdirectories under /usr/lib/locale), such as de_DE or en_US. Alternatively, locale may be specified as an empty string, meaning that locale settings should be taken from environment variables:

setlocale(LC_ALL, “”);

We must make this call in order for a program to be cognizant of the locale environment variables. If the call is omitted, these environment variables will have no effect on the program.

以下摘自stackoverflow.com

A C program inherits its locale environment variables when it starts up. This happens automatically. However, these variables do not automatically control the locale used by the library functions, because ISO C says that all programs start by default in the standard ‘C’ locale.

2016年9月简讯

工作方面:
上半个月整个部门关闭,除了做一些交接工作,倒也没什么其它的事情。

业余项目:
Golang 101 Hacks有时间还是会更新一下。

生活方面:
回了一次老家,发现老家还是最适合生活和养老的地方。没有雾霾,蓝蓝的天上白云飘,每天吃着无化肥无农药的蔬菜,真正的鲜牛奶,等等。呵呵,真是不错。

读书方面:

利用在火车的上的时间,读了《平凡的世界》第一部,以后有时间再把其它两部读完。

找工作:
投了几份简历,不过没什么消息。十一过后要全力以赴的找工作了。