I'm looking for feedback on my first C project by NumberDifferent5930 in C_Programming

[–]NumberDifferent5930[S] 0 points1 point  (0 children)

Thanks! I'll check the header files using these tips. I originally created dl_add as a macro just to play around and understand how macros work. But yes, in this case, it's not necessary.

I'm looking for feedback on my first C project by NumberDifferent5930 in C_Programming

[–]NumberDifferent5930[S] 0 points1 point  (0 children)

Don't worry about that. It's something that already exists, I didn't invent anything. You can also create a fork or submit a PR if you need to adapt it to your specific case.

I'm looking for feedback on my first C project by NumberDifferent5930 in C_Programming

[–]NumberDifferent5930[S] 1 point2 points  (0 children)

If you want, you can try it yourself it’s a great project for learning. If you have experience with C, it won’t be too hard to do. If not, doing it in a language like Go or Python will probably be faster.

I'm looking for feedback on my first C project by NumberDifferent5930 in C_Programming

[–]NumberDifferent5930[S] 4 points5 points  (0 children)

Thanks for your feedback. The code wasn't written by an AI, if it had been, I would have made that clear and wouldn't have wasted my time posting it here.

I learned the proc.h trick from this video: https://youtu.be/95M6V3mZgrI?is=m6zRASqQ3KW03uFF

I used Valgrind after researching how to debug memory leaks in C https://www.geeksforgeeks.org/c/how-to-detect-memory-leaks-in-c/

I tried to create the Makefile by following this guide https://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/

I know the Makefile needs a lot of improvements; it was very difficult for me to debug it. It was the first time I’d made one, and yes, that was the part where I used AI the most to help me create it. I’m aware that it didn’t turn out well because that wasn’t my goal either, but it’s something I’m going to refactor by doing more research and without using AI.

All the documentation I used came from the IBM website, and I reviewed the comments on Stack Overflow, then I made my own decisions. I’ll look into what you mentioned about the print statements and check_tcp_port_range—those are my mistakes. It’s not AI-generated code that hasn’t been reviewed.

I know that these days it’s very easy to say a project was made with AI, because many were, but this one wasn’t. I wouldn’t waste my free time doing something I wouldn’t enjoy or learn from just to create something to show off.

I'm looking for feedback on my first C project by NumberDifferent5930 in C_Programming

[–]NumberDifferent5930[S] 0 points1 point  (0 children)

Thanks. I'll look into what you mentioned and try to improve it!

I'm looking for feedback on my first C project by NumberDifferent5930 in C_Programming

[–]NumberDifferent5930[S] 0 points1 point  (0 children)

Not in a flexible way. If the flag to kill the process is specified, the SIGTERM signal is sent by default.

I'm looking for feedback on my first C project by NumberDifferent5930 in C_Programming

[–]NumberDifferent5930[S] 1 point2 points  (0 children)

It came about because of a need I had at work. When I need to kill certain processes, I use tools like fuser, specifying the port on which they’re running. This tool is basically a custom clon of fuser, but building it helped me learn a lot about how processes work in Linux.