IRC channel logs

2023-06-23.log

back to list of logs

<wingo>meep
<cow_2001>okay, so right now i have a spawned child which i waitpid on until it had finished before i spawn it again. i want to kill both it and the guile process that spawned it. i've tried (sigaction SIGTERM (lambda (x) (kill spawned-child-pid SIGTERM) (exit EXIT_SUCCESS))), but it doesn't work as expected.
<cow_2001>i don't know what to do
<mwette>cow_2001: read man page on kill(2) and see if using pid=0 may help
<cow_2001>thank you!
<cow_2001>strange that i have to send the kill signal twice
<cow_2001>mwette: many thanks!
<cow_2001>(kill 0 pid) works!
<cow_2001>err (kill 0 SIGTERM)
<cow_2001>okay, here's the last version. stuff works as expected, except the two killings thing. https://git.sr.ht/~kakafarm/guile-clipboard-speaker/tree/db935f07e10b928cb415aa1d8a9f6a762b4b1fa5/item/clipboard-speaker.scm
<RhodiumToad>what thing?
<cow_2001>RhodiumToad: i have to use --kill twice to kill the main process
<cow_2001>when you run it once, it locks a file and starts a loop over a fifo, receiving a line and loop again and again. second and so on will write a line to the fifo file each time you run it and exit
<cow_2001>but if you run it with --kill you will kill the first process
<cow_2001>but right now you need to run it twice
<Kolev>How do I use `(crypt key salt)`? Entering `(crypt "bob" "Password1$")` did not work in a fresh Guile REPL.
<mwette>for me: (crypt "p@ssw0rd" "salt") => "sazzQOFNSMfMo"
<RhodiumToad>the format of the salt matters
<RhodiumToad>in particular, if the salt doesn't start with $ then you're using the old weak hashing method