P
Peter
When compiling the following code to study the execv() system call, I get
the compilation error for exit() shown below.
I'm using ssh from home to access my university Unix console. I was
thinking that maybe the firewall or my access privileges may be the problem.
Can someone please explain.
#include <unistd.h>
main()
{
char * const av[]={"ls","-l",(char *)0};
execv("/bin/ls", av);
perror("execv failed");
exit(1);
}
runls2.c: In function âmainâ:
runls2.c:8: error: syntax error before numeric constant
runls2.c:9: warning: incompatible implicit declaration of built-in function
âexitâ
the compilation error for exit() shown below.
I'm using ssh from home to access my university Unix console. I was
thinking that maybe the firewall or my access privileges may be the problem.
Can someone please explain.
#include <unistd.h>
main()
{
char * const av[]={"ls","-l",(char *)0};
execv("/bin/ls", av);
perror("execv failed");
exit(1);
}
runls2.c: In function âmainâ:
runls2.c:8: error: syntax error before numeric constant
runls2.c:9: warning: incompatible implicit declaration of built-in function
âexitâ