Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Modify the program exec_in.c to obtain the same result but replacing the functions sleep and system for system calls. You can use exit, exec*, pause, alarm, etc. The new program will be called exec_in2.c and keep the original program syntax
2. Relevant commands, code, scripts, algorithms:
3. The attempts at a solution (include all code and scripts):
I'm not sure what system call I need to solve the problem, I think that I need to use alarm but I don't know how to use correctly that, I never used system calls in C before, also I have only been using linux one week and I'm really lost.
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course): Centre d'estudis Roca, Barcelona, Spain, Mariano Torres
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
I use ubuntu 12.04 64 bits
Last edited by alwayslearn; 05-19-2015 at 08:11 AM..
Hi!
At first I'm new to this forum and I'm not sure if this post is correct in this place.
I have a problem trying to change 2 C instructions for system calls. The code that I have is that:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include... (4 Replies)
Hello,
how would i be able to call ps in C programming?
thanks,
---------- Post updated at 01:39 AM ---------- Previous update was at 01:31 AM ----------
here's the complete system call, ps -o pid -p %d, getpit() (2 Replies)
Hi,
I'm new to UNIX system calls. Can someone share your knowledge as to how exactly system calls should be executed?
Can they be typed like commands such as mkdir on the terminal itself? Also, are there any websites which will show me an example of the output to expect when a system call like... (1 Reply)
open, creat, read, write, lseek and close
Are they all primitive?
:confused:
*Another Question: is there a different between a system call, and an i/o system call? (2 Replies)
What does the system call "dup" do?
What is the difference between dup and dup2
I have a fair idea of what it does but I am confused when its coming down to the exact details...
Please help me!:confused: (2 Replies)