See https://github.com/smuos/fork1.c/blob/master/hello.c#L11-L14 The first argument is always the executable path.