Invoking a system using syscall()

Pranay Srivastava pranjas at gmail.com
Sat Jun 7 02:16:58 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.

What are you trying to see there? Why should any output come over there?

Do you need to use strace instead?

>
> #include <sys/types.h>
>
> int main()
> {
>        pid_tret = syscall(20);
>        return 0;
> }
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
        ---P.K.S



More information about the Kernelnewbies mailing list