Path: utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!bin From: bin@primate.wisc.edu (Brain in Neutral) Newsgroups: comp.sys.mips Subject: Signal return value? Message-ID: <1568@uakari.primate.wisc.edu> Date: 8 Feb 90 16:40:08 GMT Organization: UW-Madison Primate Center Lines: 53 For the signal() system call in RISC/os 4, there are multiple versions. The BSD man page indicates that the handler function returns int: SIGNAL(3C-BSD) RISC/os Reference Manual SIGNAL(3C-BSD) SYNOPSIS #include (*signal(sig, func))() int (*func)(); NOTES (MIPS) The handler routine can be declared: handler(sig, code, scp) int sig, code; struct sigcontext *scp; That's fine, and consistent. ---------------------------------------------------------------------------- On the other hand, one SYSV man page indicates that the function returns void, but then the example declaration is that of a function that returns int. Which is it? SIGNAL(2-SysV) RISC/os Reference Manual SIGNAL(2-SysV) SYNOPSIS #include void (*signal (sig, func))() int sig; void (*func)(); NOTES (MIPS) The handler routine can be declared: handler(sig, code, scp) int sig, code; struct sigcontext *scp; Even more confusing, there is a SIGNAL(3-SysV) man page, which says: (*signal(sig, func))() int (*func)(); which is the same as SIGNAL(3C-BSD), but different than SIGNAL(3-SysV)! I seek enlightenment... Paul DuBois Internet: dubois@primate.wisc.edu UUCP: rhesus!dubois FAX: 608/263-4031