/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that prints the parent's pid and groupid. */
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>

int main() {
    int pid;
    
    pid = fork();
    if(pid == 0) {
        printf(" The child pid is %d\n", getpid());
    }
    else {
        printf(" The parent pid is %d\n",getpid());
        printf(" The parent group id is %d\n",getpgrp());
    }
}
