C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
setjmp and longjmp Posted by mr123 on 3 Aug 2005 at 8:33 AM
Has anybody tried using setjmp and longjmp in their codes..I am trying to use them. I am aware that they are not very much preferred except for exceptional situations...Has anyone had experience using it.. had any problems with it...??Pls let me know.
Thanks
Report
Re: setjmp and longjmp Posted by stober on 3 Aug 2005 at 10:30 AM
: Has anybody tried using setjmp and longjmp in their codes..I am trying to use them. I am aware that they are not very much preferred except for exceptional situations...Has anyone had experience using it.. had any problems with it...??Pls let me know.
: Thanks
:


I used them occasionally in MS-DOS 16-bit c programs. They cannot be used at all in c++ programs. I never recall having any problems with them, just have to make sure that setjmp() is called before attempting to do a longjmp().
Report
Re: setjmp and longjmp Posted by mr123 on 3 Aug 2005 at 10:43 AM
: : Has anybody tried using setjmp and longjmp in their codes..I am trying to use them. I am aware that they are not very much preferred except for exceptional situations...Has anyone had experience using it.. had any problems with it...??Pls let me know.
: : Thanks
: :
:
:
: I used them occasionally in MS-DOS 16-bit c programs. They cannot be used at all in c++ programs. I never recall having any problems with them, just have to make sure that setjmp() is called before attempting to do a longjmp().
:
Thanks for your message.. I am trying to use them to recover from core dumps that happen occasionally... I am trying to use it in C programs in AIX platform.. Have u had luck using it for similar situations??
Report
Re: setjmp and longjmp Posted by stober on 3 Aug 2005 at 2:05 PM
: :
: Thanks for your message.. I am trying to use them to recover from core dumps that happen occasionally... I am trying to use it in C programs in AIX platform.. Have u had luck using it for similar situations??
:


No, but you should correct the problem that causes the core dumps instead of applying a band-aid solution that will probably bite you in the a$$ something in the future.
Report
Re: setjmp and longjmp Posted by mr123 on 4 Aug 2005 at 6:52 AM
: : :
: : Thanks for your message.. I am trying to use them to recover from core dumps that happen occasionally... I am trying to use it in C programs in AIX platform.. Have u had luck using it for similar situations??
: :
:
:
: No, but you should correct the problem that causes the core dumps instead of applying a band-aid solution that will probably bite you in the a$$ something in the future.
:
Yes, I know that this is not preferred.. We are trying to catch the core dumps from a third party product which we have no control over.. And a great deal of thought had gone in, before this option was even considered...
Report
Re: setjmp and longjmp Posted by stober on 4 Aug 2005 at 9:02 AM
: :
: Yes, I know that this is not preferred.. We are trying to catch the core dumps from a third party product which we have no control over.. And a great deal of thought had gone in, before this option was even considered...
:

I don't think setjmp and longjmp is going to help you correct bugs in 3d party programs. Go back to them, b1tch-slap them a few times, and tell them to fix their bugs




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.