It's different on my UNIX on Sunfire . When I try man fork I get this :
It's got to be different. What you've posted is the output of man fork
while what I said was man getpid
, read my post.
Why are you worrying about fork. As far as the error is concerned, its getpid that's causing it. It's not even an error, but a warning, and your program should still execute. On my P.C. I just copied and pasted your code and it ran fine (except for that semi-colon after #include <stdio.h> ;
So dear, what is the neccessary lib to include to get rid of the warning ?
You have all the libraries, its just that the declaration is missing.
As far as getting rid of the warning is concerned, just include the header files sys/types.h
and it should work fine.
Hope this helps!