The Open Source Swiss Army Knife

/code/c/unix_c/fork/
/code/c/unix_c/fork/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /code   /c   /unix_c   /fork 
sub-categories and articles

                                                  
dirsimulator add
   --->create new sub-category


Makefile
add

default: all all: child.o child_demo1 child_demo2 child_demo3 child_demo4 child_demo5 child.o: child.c child.h

README
add

Child process library and example programs Copyright 1999 by Mark Whitis. All Rights Reserved. http://www.dbd.com/~whitis/software/ README - This file

chaincritical.c
shows effect of accessing shared data

/* http://vip.cs.utsa.edu/usp/  dr.robbins utsa computer science  "unix systems programming" */

child.c
struct timeval tv; struct timezone tz; many typical unix programming constructs illustrated

#include <sys/time.h>

child.h
add

#ifndef _CHILD_H

child_demo1.c
add

#include <sys/time.h>

child_demo2.c
add

#include <sys/time.h>

child_demo3.c
add

/* probably more include files than we really need */

child_demo4.c
add

#include <stdlib.h>

child_demo5.c
add

/* probably more include files than we really need */

fork.c
pipe to do IPC after fork example

/****************************************************************

fork.htm
wait and fork functions

  1. overview
  2. code sample
  3. explanation
  4. wait

license.html
add

Software License

makefile


CC = gcc CFLAGS = -Wall -g COMPILE = $(CC) $(CFLAGS) -c SRCS := $(wildcard *.c) ../common/restart.c OBJS := $(patsubst %.c,%.o,$(SRCS))

mkzombie.c
makes a zombie visible running ps command with lifetime of 60 seconds

#include <stdio.h>

old_logfile.html
add

Process Ring Simulator Log for joe speigle generated Tue Mar 09 20:04:24 GMT 2004

Process Ring Simulator Log for joe speigle generated Tue Mar 09 20:04:24 GMT 2004

  1. code: code for the program
  2. one: default configuration
  3. two: Change After fork from parent to child
  4. three: Change After fork from parent to either
  5. four: Change After fork from parent to random
  6. five: Change Choose Process from FCFS to Random
  7. six: Change Scheduling from no preempt to round robin with a quantum of 5 and Choose Process from FCFS to Random
  8. seven: Repeat the experiment above with a quantum of 2 and see if it behaves differently
  9. eight: Change Print Atomic to Print Not Atomic with probability 0.1
  10. nine: Insert a wait(NULL) call before the fprintf statement
  11. ten: Change Print Atomic to Print Not Atomic with probability 0.1 and insert a wait(NULL) call before the fprintf statement

prexit.c
(stevens) print a description of child's exit status after wait or waitpid call

#include	<sys/types.h>

sigchld.c
(stevens) macros WIFEXIT checks on dead child; how to handle terminated child with handler

#include	"calld.h"

simplefork.c
add

/* http://vip.cs.utsa.edu/usp/  dr.robbins utsa computer science  "unix systems programming" */

wait.txt
wait and wiatpid functions

waitpid has 3 args: pid_t pid, int * statloc, int options wait has 1 arg: int * statloc one arg in all cases is int * statloc) an int pointer!!!!
   --->upload your article


User submitted category site links


(None)

-->submit a page from your site dealing with fork to the sirfsup! web directory for listing

return to top