- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Does anyone have an example of how to install a signal handler in FORTRAN. After reading the signal(3f) man page I came up with something like this, but it doesn't work. I'm trying to catch a floating point overflow (72).
program main
ierr = signal(72,myhandler,-1)
write(6,*) "ierr=",ierr
...
end
subroutine myhandler
write(6,*) "Called my handler"
end
The value returned by ierr is zero, according to the man page it should return the address of the subroutine. What am I doing wrong here? Any help would be greatly appreciated!
Thanks,
Bryan Walsh
Does anyone have an example of how to install a signal handler in FORTRAN. After reading the signal(3f) man page I came up with something like this, but it doesn't work. I'm trying to catch a floating point overflow (72).
program main
ierr = signal(72,myhandler,-1)
write(6,*) "ierr=",ierr
...
end
subroutine myhandler
write(6,*) "Called my handler"
end
The value returned by ierr is zero, according to the man page it should return the address of the subroutine. What am I doing wrong here? Any help would be greatly appreciated!
Thanks,
Bryan Walsh
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
I do want 72 since this is the signal being sent, but I've also tried 75.
Bryan
I do want 72 since this is the signal being sent, but I've also tried 75.
Bryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmm. Well, you've now gone outside what I know. I'll pass your question on to our exception handling expert and see what he says.
Steve
Steve
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page