[cs631apue] TCP HW2

Jan Schaumann jschauma at stevens.edu
Tue Sep 11 23:10:52 EDT 2012


tparisi <tparisi at stevens.edu> wrote:

> 1. How descriptive should the error messages be? For instance is it  
> enough to say "The source file did not open" as an error message when  
> opening that file or do we have to be more descriptive based on what is  
> returned?
>
> 2. What permissions should we give the destination file if it does not  
> exist?  I would assume those that are source file have but I want to  
> double check.
>
> 3. What should we do if there is a directory in the in the destination  
> path that doesn't exist, should we create that or give the user an  
> error?

For all these, consider what cp(1) does and what you would consider the
expected behaviour.  (If those two differ, go with the first.)

> 4. In the man page that you gave us it said that the usage was "tcp  
> file1 file2" etc.  Do you want our tcp program to run without having to  
> write ./tcp or is having the "./" in front acceptable?

There is nothing you can do in your program to eliminate the need for a
user to specify "./" before the executable if it is not within the
user's PATH.  So necessarily that is perfectly fine.

-Jan


More information about the cs631apue mailing list