Re: catching exit
CBFalconer wrote:
I thought that the original post was pretty clear about the poster's
problem.
No. He (the OP) is having to use a program written by someone else as a
*function* in his program. Unfortunately the program is littered with
calls to exit() which he'll obviously have to avoid if he intends to
use the program as a routine.
This sort of transformation is very difficult with a program composed of
tightly coupled routines, which were never written for independent use.
CBFalconer wrote:
Keith Thompson wrote:
... snip ...
>
Well, you read the OP post as showing more knowledge than I did.
>CBFalconer <cbfalconer@yah oo.comwrites:
>>
>>
>>
>>
>He knew that. If he wanted the existing exit calls to terminate
>the program, why would he have asked what to do about them?
>>If that's what he wants to do that is another case. But the
>>previous effect was to terminate the program, whch is what exit
>>does.
>>previous effect was to terminate the program, whch is what exit
>>does.
>He knew that. If he wanted the existing exit calls to terminate
>the program, why would he have asked what to do about them?
Well, you read the OP post as showing more knowledge than I did.
problem.
If the original code was in the main function (which I believe it
was) it could probably have simply used 'return'.
was) it could probably have simply used 'return'.
*function* in his program. Unfortunately the program is littered with
calls to exit() which he'll obviously have to avoid if he intends to
use the program as a routine.
This sort of transformation is very difficult with a program composed of
tightly coupled routines, which were never written for independent use.
Comment