Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <wait.h>
- #include <unistd.h>
- #include <string.h>
- #include <time.h>
- #include <signal.h>
- #include <sys/wait.h>
- int main(){
- char command [20];
- char * parameters[20];
- int i;
- for(i = 0; i < 20; i++){
- parameters[i] = (char*)malloc(sizeof(char) * 100);
- }
- strcpy(command, "date");
- strcpy(parameters[0], "date");
- parameters[1] = NULL;
- execvp(command, parameters);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement