11 Exec( ) example 17 execvp(*command, command); 18 } 19 else 20 printf("This is parent\n"); 21 }
12 Wait( ) Wait for a process to terminate. Generally used in parent process which waits for the child to terminate waitpid( ) waits for a specific process. Example programs for wait()
13 Inter-process communication. Signals: software interrupts generated when certain asynchronous events occur. E.g.: when you press Control C to stop a program. Pipes.
14 Inter-process communication. Semaphores: mutual exclusion. Shared memory: multiple processes share a common region in memory. Message queues: linked-list of messages.
15 Debugging An easy way to debug in my opinion is printf statements. GDB: Gnu Debugger. Help for gdb available on class homepage –Invest some time learning it; it will make your life much easier http://www.gnu.org/manual/gdb/