Problems with using execvp on a constructed string

前端 未结 3 1905
别跟我提以往
别跟我提以往 2021-01-21 12:42

I\'m trying to write a shell, and part of its construction is executing code from a user-inputted string (buffer). However, when I attempt to execvp the string with additional i

3条回答
  •  甜味超标
    2021-01-21 12:52

    The argument buffer is wrong. The second argument of execvp is an array of pointers. With this cast, you are hidding a compiler warning, but it does not work.

提交回复
热议问题