- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Playing around with SIGNAL (defined in IFPORT.F90) I have found:
Markus
Playing around with SIGNAL (defined in IFPORT.F90) I have found:
- Documentation says "The result is the previous value of proc associated with the specified signal". But neither Windows nor Linux versions seem to return a valid value. Calling SIGNAL for the second time I would expect it returns the address of the signal handler specified at the previous call. Windows returns 0, Linux some random number.
- SIGNAL's interface defines proc as EXTERNAL. Thus it cannot be called with a variable as proc argument. But this is needed if I want to restore a previous signal handler as its address is stored in a variable.
Markus
Usage:
result = SIGNAL (signum, proc, flag)
Interface:
FUNCTION SIGNAL(SIGNUM, PROC, FLAG)
use ifport_types
!DEC$ ATTRIBUTES DEFAULT :: SIGNAL
INTEGER(POINTER_LEN) :: SIGNAL
INTEGER(4) :: SIGNUM, FLAG
INTEGER(4), EXTERNAL :: PROC
END FUNCTION
Link Copied
0 Replies

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