The setpgid function sets the group-id gid of the
process whose process-id is pid. If pid is 0, then the
current process-id will be used. If pgid is 0, then the pid
of the affected process will be used.
If successful zero will be returned, otherwise the function will
return -1 and set errno accordingly.