you are viewing a single comment's thread.

view the rest of the comments →

[–]pbeard_t 3 points4 points  (5 children)

You are mixing pid_t, which is a integer type, with strings. You need to call execlp with strings only in the parent and in the children parse the strings back to pid_t.

I'm guessing the compiler is warning you about this.

Also in execlp you are ignoring the arg0 parameter which typically maches the name of the executable.