chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] (exit) not exiting ...


From: Alan Post
Subject: Re: [Chicken-users] (exit) not exiting ...
Date: Tue, 12 Jul 2011 19:01:53 -0600

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]www.kiatoa.com/fossils/megatest, in
>    cmd-run-proc-each-line in process.scm.
> 
> References
> 
>    Visible links
>    1. http://www.kiatoa.com/fossils/megatest

> _______________________________________________
> Chicken-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-users


-- 
.i ma'a lo bradi cu penmi gi'e du



reply via email to

[Prev in Thread] Current Thread [Next in Thread]