Академический Документы
Профессиональный Документы
Культура Документы
Open:
AIM:
To Execute a Unix Command in a C program using open() system call.
ALGORITHM:
1. Start the program
2. Declare the necessary variables
3. Open file1.dat to read or write access
4. Create file1.dat if it doesnt exist
5. otherwise Return error if file already exist.
Read:
AIM:
To Execute a Unix Command in a C program using read() system call.
ALGORITHM:
1. Start the program
2. Declare the necessary variables
3. Permit read access to the given file name testfile1.txt
4. print the read content on your terminal.
Write:
AIM:
To Execute a Unix Command in a C program using write() system call.
ALGORITHM:
1. Start the program
2. Declare the necessary variables
3. Permit write access to the given file name
4. Write the content into defined file.
AIM:
To create a child process using Fork() system call.
ALGORITHM:
1. Declare the necessary variables.
2. Parent process is the process of the program which is running.
3. Create the child1 process using fork() When parent is active.
4.Print the parent process and child process using for loop.