So Im rather new to the C language exec family functions and was wondering why cal returns
usage: cal [-13smjyV] [[[day] month] year]
When passed to execve(); below
pid = fork( ) ;
if ( pid == 0 ) {
char *myArgv[ ] = { "cal", "4", "1980", "NULL"};
char *myEnv[ ] = { "HOME=/usr/bin", NULL} ;
execve( "/usr/bin/cal", myArgv, myEnv) ;
} else {
printf("parent process waiting for execve complete \n" );
}
whereas when I call 'cal 4 1980' manually through my terminal I get an actual printout?
April 1980
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30