nelhage / reptyr

Reparent a running program to a new terminal
MIT License
5.78k stars 216 forks source link

Completion of error handling #44

Closed elfring closed 10 years ago

elfring commented 10 years ago

Would you like to add more error handling for return values from functions like the following?

nelhage commented 10 years ago

I'm not particularly interested in error-handling fprintf, since it will just make the code much noisier for no particular practical benefit. sigaction would be reasonable.

elfring commented 10 years ago

I would appreciate if the specified output was successfully written to a file. How do you think about to detect every error situation as early as possible?

nelhage commented 10 years ago

I don't know what I would do if the fprintf fails, here -- if we can't write to stderr, how are we going to report the error to the user? It should also be a super rare condition for writing to stderr to error out.

elfring commented 10 years ago

A failure (e. g. full log file) could be indicated by the return value of your program, couldn't it?

Are you interested to apply aspect-oriented software development? How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?