Wednesday, December 10, 2008

Exercise #1 FAQ

Q: What should we do with the 'tee-proc' man page?
A: 'tee-proc' is a new command I have invented for the exercise sake. You are required to implement the new 'tee-proc' command which you have received it's man page as a specification.

Q: What is 'tee-proc' supposed to do?
A: The 'tee-proc' commad basically pipes the stdout of one process into the stdin of another between a list of applications given to is as arguments (argv).

Q: Is -i and --ignore-interrupts the same option?
A: Yes. They are the same option only with a different name, i.e. is should be possible to use either 'tee-proc -i ...' or 'tee-proc --ignore-interrupts'.

Q: How can I find out if a file (program) exists in a directory, in order for me to execute it?
A: Instead of checking whether the file exists you can try to exec() the file. If it doesn't exist, or you don't have execution permissions to the file, the exec() call will fail and you can continue looking...

Q: I have a another question, what should I do?
A: You can try talking to your friends and I'm sure you can come out with a reasonable and logical solution.

Q: My friends and I couldn't come to a reasonable and/or logical solution, what should we do?
A: You can always mail me with a specific question and I'll do my best to help.

Good luck


7 comments:

Unknown said...

question:
if tee-proc recieves no arguments what should be done?
what kind of error message should it return?

geva.biu said...

it's not an error therefore you don't need to print out anything.

yfital said...

Hello,
Do we have to use Signaling in order to make sure the child "died" properly?

Can't we just use EXIT(-1) in the child (in case the EXECVP failed) and catch it inside the father?

Thanks.

Unknown said...

question on execercise 2:
we have problem cewating shared memory in size of 26^6. can you explain how should it be done?

Unknown said...

can you please publish the clarification you said you'll publish?

geva.biu said...

as root write:
sysctl -w kernel.shmmax=1285089624
which is the sum of 26^1+26^2+26^3+26^4+26^5+26^6.

Unknown said...

hi moti thank you for your response.
when i asked for clarifications i was refering to a file you said you'll piblish including all the main questions we've asked you in class about this excercise. since not everyone were in class and even those who where in clsss remember different instructions. for example i remember that you told us to send binary info to standart output but some student remember other instructions. i remember that you wrote down this main questions and since excercise is to be submited in two days from today it would be very helpful if everyone will have all the instructions.