Invoking a system using syscall()

Sudip Mukherjee sudipm.mukherjee at gmail.com
Sat Jun 7 02:15:38 EDT 2014


On Sat, Jun 7, 2014 at 11:20 AM, Dipanjan Das <mail.dipanjan.das at gmail.com>
wrote:

>
> Hi,
>
> I want to invoke getpid() system call using syscall. Here's the code
> snippet below. But, I can't find anything in dmesg|tail output.
>
> #include <sys/types.h>
>
> int main()
> {
>        pid_tret = syscall(20);
>        return 0;
> }
>

Have you seen the code of the system call sys_getpid ? I dont find anything
there which will print in dmesg .. ofcourse you can modify the code and
then you will get the output in dmesg .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140607/7f05acd2/attachment-0001.html 


More information about the Kernelnewbies mailing list