Advanced #Programming in the #UNIX Environment
Side-quest: what does this program return?
```
int main() {
printf("Hello World!\n");
}
```
The answer, as they say, may surprise you...
Advanced #Programming in the #UNIX Environment
Side-quest: what does this program return?
```
int main() {
printf("Hello World!\n");
}
```
The answer, as they say, may surprise you...
Advanced #Programming in the #UNIX Environment
Week 6, Process Control
In the last video lecture for this week, we look at process control: how new processes are started from an executable, what resources are shared between parent and child, and what happens when they terminate. In particular, we will look at the fork(2), exec(3), and wait(2) system calls. Be warned, though: there will be #zombies, so limber up (Rule #7).
Advanced #Programming in the #UNIX Environment
Week 6 related link: #Linux x86 Program Start Up or - How the heck do we get to main()?
Compare to what we covered in Segment 2 of this week.
http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html
Advanced #Programming in the #UNIX Environment
Week 6, Process Limits and Identifiers
Having looked at the process layout in memory, how it starts and is terminated, we now learn that certain properties are restricted via resource limits, specified as a "soft" and a "hard" limit, with only the superuser being able to raise the latter.
A process also has a process ID (PID) and a parent process ID (PPID). More
on these process relationships in our next videos.
Advanced #Programming in the #UNIX Environment
Week 6, The Environment (a tangent from 2011)
How large can the environment get? Is there a limitation on the size of a single environment variable? And why did I sometimes encounter this error message:
sudo: unable to execute <command>: success
Advanced #Programming in the #UNIX Environment
Week 6, The Environment
We're going to take a look at the process environment, using what we learned about the process layout in memory to understand how the environment variables are stored and, if necessary, moved around. We'll also get a quick look at what malloc(3) does.
Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.
All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.