Home:ALL Converter>Passing return values from a system call to user process in freebsd

Passing return values from a system call to user process in freebsd

Ask Time:2012-09-22T12:43:07         Author:Jothikumar Rathinamoorthy

Json Formatter

I have implemented a system call which returns values like 0, 1 and 2, according to some conditions in the process priority. I am performing a syscall() in a file. When the system call returns 0, I am getting the return value of syscall() as 0. But, when it return 1 or 2, I am getting -1 for 1 and the system call number for any other values. Please let me know, is it possible to return values apart from 0 and -1.

Author:Jothikumar Rathinamoorthy,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/12540789/passing-return-values-from-a-system-call-to-user-process-in-freebsd
yy