Generally speaking, the
volatile keyword is intended to
prevent the compiler from applying any optimizations on the code that assume values of variables cannot change "on their own."
In C, and consequently C++, the volatile keyword was intended to
allow access to memory mapped devices
allow uses of variables between setjmp and longjmp
allow uses of sig_atomic_t variables in signal handlers.
-------------------------------------------------------------------
Background processes are those whose process group ID differs from the terminal's; such processes are immune to keyboard-generated signals. Only foreground processes are allowed to read from or write to the terminal. Background processes which attempt to read from (write to) the terminal are sent a SIGTTIN (SIGTTOU) signal by the terminal driver, which, unless caught, suspends the process.
A job may also be referred to using a prefix of the name used to start it,
http://web.mit.edu/gnu/doc/html/features_5.html
--------------------------------------------------------------------
EINTR means "This call did not succeed because it was interrupted. However, if you try again, it will probably work."
In other words, EINTR is not a fatal error -- it just means you should retry whatever you were attempting.
(Edit: According to my man-page, fork() never should return EINTR, although it may return EAGAIN under certain cases)
http://cboard.cprogramming.com/c-programming/124120-errno-%3D%3D-eintr-means-what-thank-u.html
volatile and job and EINTR
猜你喜欢
转载自wwwjjq.iteye.com/blog/1625975
今日推荐
周排行