/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h> 

pid_t getpgrp() {
    void *fptr;
    pid_t  retval;

    fptr = dlsym(_ChUnistd_handle, "getpgrp_chdl");
    if(fptr == NULL)  {
       printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
       return NULL;
    }
    dlrunfun(fptr, &retval, getpgrp);
    return retval;
}
