IRC channel logs

2021-08-11.log

back to list of logs

***vijaymarupudi_ is now known as vijaymarupudi
<apteryx>it seems to hang on (primitive-exit 0) in the child; (waitpid child-pid) in the parent hangs
<apteryx>nevermind, the waitpid was borked (child-pid would be the current pid). I'm making a very minimal program to see things clearly (and be able to share)
<apteryx>scrap the above, primitive-fork *does* return the pid of the child in the parent. eh.
<apteryx>OK, so I think I've distilled what I'd like to happen and what doesn't currently happen in this minimal program: https://paste.gnome.org/pdm2lpow3
<apteryx>only the first test case passes
<apteryx>OK, actually the first 2 passes.
<apteryx>are the Guile current file descriptors captured in closures?
<vijaymarupudi>Just ran your program
<vijaymarupudi>The error is that payload is currently a procedure that returns a procedure
<vijaymarupudi>Remove the lambda, and it appears to work
<vijaymarupudi>apteryx: ^^
<apteryx>haha, it's great to have another pair of eyes! Thank you!
<vijaymarupudi>:)
<apteryx>somehow, redirecting the subprocess stdout and stderr to a pipe seems to cause the child to not send the SIGCHLD signal; the code looks like: https://paste.gnome.org/pyaomc1nx
<apteryx>the test relies on this SIGCHLD signal to wait on the child process to finish, but when redirection is enabled it doesn't fire, it seems
***apteryx_ is now known as apteryx
<dsmith-work>{appropriate time} Greetings, Guilers
<vijaymarupudi>Question: how can I associate finalizers to run on gced objects without creating a guardian and a gc hook for each different finalizer procedure?
<vijaymarupudi>daviid: Understand how g-golf cleans up gobjects will probably help me answer this question
***chris is now known as Guest2996
***Guest2996 is now known as chrislck
<stis>Tjenixen guilers!
<daviid>vijaymarupudi: as things are, g-golf does not clean gobject instances, you need, to do so, to call unref - see the enref entry in the manual
<vijaymarupudi>Ah I see, I wasn't aware of that, so I was leaking memory the whole time?
<vijaymarupudi>I think I have an answer to my question, it is more practical to dispatch a cleanup function based on the type of the object, and single guardian can take care of all objects in that case. Dispatching on the type of object can be done using goops.
<vijaymarupudi>I think something like this can also be used for g-golf
<vijaymarupudi>daviid: I wonder if the examples in g-golf can be modified to cleanup after themselves to prevent memory leaks? https://www.gnu.org/software/g-golf/manual/g-golf.html#Hello-World_0021