Indirect system call (WARNING)

John F. Haugh II jfh at rpp386.cactus.org
Sun Nov 26 17:59:41 AEST 1989


In article <128380 at sun.Eng.Sun.COM> lm at sun.UUCP (Larry McVoy) writes:
>There has been some discussion of the use of syscall() on this group.  Just a
>fair warning to budding hackers - if my memory servers me correctly there are
>times when it won't work.  In particular, syscall returns an int and if you
>are calling a syscall that sends out stuff in more than one register (see
>below) it won't work.  No, I don't have a list of stuff that fails, but you
>should be able to look at the man pages and figure it out.  

Worse still, there are system calls which return values used by more
than one function.

One function may use the value in the first function return
register while another uses the value in the second function
return register.  getpid() and getppid() come to mind.
-- 
John F. Haugh II                        +-Things you didn't want to know:------
VoiceNet: (512) 832-8832   Data: -8835  | The real meaning of IBM is ...
InterNet: jfh at rpp386.cactus.org         |   ... I've Been to a Meeting.
UUCPNet:  {texbell|bigtex}!rpp386!jfh   +--<><--<><--<><--<><--<><--<><--Yea!--



More information about the Comp.unix.wizards mailing list