program stops after execvp( command.argv[0], command.argv)

后端 未结 3 630
闹比i
闹比i 2021-01-23 23:55

I am writing a small shell program that takes a command and executes it. If the user enters a not valid command the if statement returns a -1. If the command is correct it exe

3条回答
  •  余生分开走
    2021-01-24 00:23

    @Pavan - Just for nit-pickers like myself, technically the statement "current process is gone" is not true. It's still the same process, with the same pid, just overwritten with a different image (code, data etc).

提交回复
热议问题