News for hackers. Stuff that matters.
Re:Not knowing the /proc file system by dadie on Wednesday October 25, 2023 @07:59AM (#38011861)
Probably off-topic: I may miss something but I have the feeling the shown C program should segfault a lot as the variable `fname` in `char* make_filename(const char*)` does not seem to be initialized.
Re:Not knowing the /proc file system by ab71e5 on Wednesday October 25, 2023 @08:24AM (#38012034)
Yeah it should be something like

    char fname[BUFSIZE];
Also better to pass that in as a variable I don't think you can return a char array allocated on the stack like that