Using execve in C
HTML-код
- Опубликовано: 16 май 2024
- 0:03 - Overview
0:49 - execve parameters
2:04 - Processes & execve
2:30 - Code example: executing the ls command
5:26 - Code example: executing a bash script
8:12 - Code example: executing another compiled C program
Very nice simple explanation for the execve, thanks a lot
This was so so so helpful!
decent explanation
Can anyone explain the reason why in this case we must use char* as opposed to char?
"char *" is a pointer, "char" is a variable. Pointers are integral to C in particular, so you should start there.
In short, your variable is a box of memory where you store a value. A pointer is an arrow that points to the box. What's useful, is that, a pointer can be moved from one box of memory to the next. So, if you think of a string as a series of boxes containing characters, you can move up and down on each character of the string. That's why, in C, char * represents a string, because it points to the beginning of the sentence.
didn't work
Asking questions like this is so useless. Literally why tf would you ask this? What do you think this accomplishes? There is no context. There isn't even really a result other than "didn't work." What didn't work? Did your computer catch on fire? Did you get an error? Can you just not write c code? I straight up hate you.
@@garbagetrash2938 You have a freedom to cultivate hate within yourself. No questions there
@@codebasic8558 I hate lazy students, not myself.
@@garbagetrash2938 lol that was funny
search where path ls command is. In my case cmd variable = "/bin/ls"