I cringed at your describing this code as "working!" I intended it to be a test; if |exit| or |_exit| were not terminating your program, I wondered if it was rare but possible condition of the kernel/C library not permitting exit (the kernel holding a frozen I/O resource for your process and your doing funny things with |atexit| being the two ways I'm aware of to keep |exit| from terminating a process.
It looks like it is something Chicken is doing, however, as your process is able to be terminated. I wonder what it could be? -Alan On Tue, Jul 12, 2011 at 10:23:35PM -0700, Matt Welland wrote: > Yep, that works! It looks right at home with the existing hacks and will > do until I get to some refactoring.... > > Thanks for the solution! > > On Tue, Jul 12, 2011 at 6:01 PM, Alan Post > <[1]alanp...@sunflowerriver.org> wrote: > > What happens if you call?: > > (use posix) > (process-signal (current-process-id) signal/kill) > > -Alan > On Tue, Jul 12, 2011 at 05:25:24PM -0700, Matt Welland wrote: > > I have some code that was "evolved" rather than designed and is > admittedly > > a bit of a mess and I needed to add an "(exit)" deep in a block where > > running a sub process has failed. However the (exit) never exits. This > is > > true both if I run compiled or interpreted. I have tried to make a > small > > test case but I can't reproduce the issue. I even replaced the (exit) > with > > a call to a function that prints a message and then does exit and it > still > > doesn't exit. I also tried _exit with the same result. > > Any suggestions on what to look at or how to debug this? > > > > My attempt to reproduce (which works fine) is below: > > > > (define foo 8) > > > > (define (runbroke cmd) > > (handle-exceptions > > exn > > (begin > > (print "FAILED! exn=" exn) > > #f) > > (cmd))) > > > > (define bar 9) > > > > (let ((res (runbroke (lambda ()(process "nadafoobar" "-l" "-blah"))))) > > (if (not res) > > (begin > > (print "Failed to run, exiting with code 7") > > (exit 7)))) > > > > (exit bar) > > > > BTW, the code is visible at [1][2]www.kiatoa.com/fossils/megatest, in > > cmd-run-proc-each-line in process.scm. > > > > References > > > > Visible links > > 1. [3]http://www.kiatoa.com/fossils/megatest > > > _______________________________________________ > > Chicken-users mailing list > > [4]Chicken-users@nongnu.org > > [5]https://lists.nongnu.org/mailman/listinfo/chicken-users > > -- > .i ma'a lo bradi cu penmi gi'e du > > References > > Visible links > 1. mailto:alanp...@sunflowerriver.org > 2. http://www.kiatoa.com/fossils/megatest > 3. http://www.kiatoa.com/fossils/megatest > 4. mailto:Chicken-users@nongnu.org > 5. https://lists.nongnu.org/mailman/listinfo/chicken-users > _______________________________________________ > Chicken-users mailing list > Chicken-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/chicken-users -- .i ma'a lo bradi cu penmi gi'e du _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users