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

Комментарии • 11

  • @ahmedf2
    @ahmedf2 Год назад

    Very nice simple explanation for the execve, thanks a lot

  • @PalanikannanM
    @PalanikannanM 2 года назад +2

    This was so so so helpful!

  • @sxx2491
    @sxx2491 Год назад

    decent explanation

  • @chrishob7318
    @chrishob7318 7 месяцев назад

    Can anyone explain the reason why in this case we must use char* as opposed to char?

    • @keyofvoid1787
      @keyofvoid1787 3 месяца назад +1

      "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.

  • @codebasic8558
    @codebasic8558 2 года назад +2

    didn't work

    • @garbagetrash2938
      @garbagetrash2938 2 года назад +2

      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.

    • @codebasic8558
      @codebasic8558 2 года назад

      @@garbagetrash2938 You have a freedom to cultivate hate within yourself. No questions there

    • @garbagetrash2938
      @garbagetrash2938 2 года назад

      @@codebasic8558 I hate lazy students, not myself.

    • @taal7245
      @taal7245 2 года назад

      @@garbagetrash2938 lol that was funny

    • @joaopedrosoares2132
      @joaopedrosoares2132 2 года назад +2

      search where path ls command is. In my case cmd variable = "/bin/ls"