Table of Contents

Systems Programming Journal

MONTH Day, YEAR

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

January 26, 2016

? : compressed if statement o Getopt; cat; -n –number : line numbers -E –show-ends –help –version

January 28, 2016

who: checking records of login

   how long?

utmp: login records short: short int posix(widely spread) getutent -access utmp file entries reads a line from the current file position in utmp file.

Febuary 2, 2016

mytime → tm_mon : month mytime → tm_mday : day mytime → tm_hour : hour

*strcpy: in string.h library copy a string

stat - get file status mode_t st_mode; «protection

Febuary 4, 2016

idle time: last time access the file

ls: opendir, closedir, readdir, scandir, …

Febuary 9, 2016

implementing ls -l: file permission,,who owns it(usrid),,date,name stat struct st_nlink stating file name : looking for the directory

Febuary 11, 2016

blocksize stat → st_size ls → mtime: modify time mytime → tm_mon; etc.

Febuary 23, 2016

new projectv _primenumber algorithm

I finally submit chmode. It was surprising that the actual chmod part was just a line.
chmod( filename, permission );

Febuary 25, 2016

man 2 fork : create a child process (doesn't inherits the timer from parents)
wait -wait for process to change state
getpid -get process id

March 1, 2016

pnc1: using fork and child process

March 3, 2016

threading → multi-threading
pthreads(7): parent's process id is different than child process id. thread & child process: each child have thread
forking & threading : space & time
data hazard: synchronization
pthread_create - create a new thread

March 8, 2016

make file and load into array and print out the value read from the file.
sorting

March 10, 2016

sockets
* protocol
* everyone have to speak same language
* using TCP
* write server first
port80 : https

March 15, 2016

bzero -write zero-valued bytes(calloc) tcp : instant client(telnet netcat)

March 16, 2016

Object Oriented Programming
PIE: Polymorphism, Inheritance, Encapsulation

Procedural, Functional, Logical

March 17, 2016

getifaddrs - get interface address (passes double pointer)

March 22, 2016

network communication
write system call
create socket and connect → connection
exec1 - executes a file ( system call )

March 24, 2016

stty: change and print terminal line settings
stty -echo
tty_ioctl: ioctls for terminals and serial lines

April 5, 2016

pipe, pipe2 : create pipe
created using mkfifo

April 7, 2016

signals!! signal(2) kill -l : list available signals signal 7

April 12, 2016

POSIX shared memory
shmat: system V shared memory operations
shm_open: open

April 21, 2016

ncurses -CRT screen handling and optimization initscr - initialize screen

April 26, 2016

newwin: creates a pointer to a windowwith given number of lines and columns.
subwin: shares memory with original window
mvprintw: display at specific position