-
Notifications
You must be signed in to change notification settings - Fork 49
added watch func #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
added watch func #95
Conversation
|
i can code review this |
|
I can code review this! |
|
Hi! Really cool project, and great implementation of the watch command. One thing: I wish you had pushed your work in the testpause branch to the main branch. As a reviewer, I didn't know that the working code was in this branch, so I was testing with the main branch, wondering why it wasn't working. But, I was super impressed to see the working implementation in testpause. Everything is very well documented in the README.md file, I appreciate this effort. The core features of the watch command (interval, header display, and output redirection) work as expected. I tested commands with various options, and they performed well. Except for the following test case: This would be an issue to solve in parsing the command arguments. One suggestion regarding usability: Consider extending the error message for unknown flags. Currently, it exits with a generic message High Level Checks:
Code Checks:
Overall, superb job! Thank you. |
|
I really liked that the README was thorough, although it would've been nice to see some more Java-doc style documentation. Another thing I noticed is that there was some dead or unused code left in High Level Checks:
Code Checks:
|
|
Sorry I didn't merge the correct one to main, I think the code will works now. |
|
Ok, this is an interesting project and you got to work with redirection, that's cool. Your description for this PR leaves a lot to be desired. I guess at a minimum you could reference the issue. The original PR stated you would support:
I do see support for killing the program with Ctrl+C but not pause/resume or alerts/notifications. Going through your code, I am confused about the use of Also, wouldn't it make sense to print the number of seconds instead (you're already doing that conversion)? I don't know if users will care how many ticks have elapsed. Ideally this would be done with the RTC instead. If the watched program fails to run, it just keeps running it anyway as Suhani mentioned. There is also a decent amount of dead (commented) code in this project and it doesn't follow xv6 formatting. I think the idea to kill the program with Ctrl+C is interesting but now you have a special key combination just for your program. I think I'd ideally find a way to do it in a bit more generic fashion but changing the kernel isn't really the point for this assignment so that's totally fine. It was a good way to get that working for now. You can do the code cleanup and error checking mentioned above to get +1 back on your implementation. |
|
Updated version looks good, has all the changes except the error checking. |
added watch func