psmile_pids.c

Go to the documentation of this file.
00001 #include <sys/types.h>
00002 #include <unistd.h>
00003 
00004 
00005 /* --------------------------------------------------------------------- */
00006 /* Copyright 2006-2010, CERFACS, Toulouse, France.  */
00007 /* All rights reserved. Use is subject to OASIS4 license terms. */
00008 /* ---------------------------------------------------------------------
00009 
00010 //BOP
00011  
00012 ! !ROUTINE: psmile_pids
00013  
00014   !INTERFACE:
00015 */
00016 void psmile_pids_(mypid, myppid)
00017 /*
00018 
00019   !FILES USED:
00020  
00021    sys/types.h
00022    unistd.h
00023  
00024   !DESCRIPTION:
00025  
00026     C routine to get current process pid and current process parent's pid
00027  
00028   !REVISION HISTORY:
00029  
00030     Date      Programmer   Description
00031   ----------  ----------   -----------
00032   02.06.09    J. Latour    created
00033 
00034 //EOP
00035 
00036  ----------------------------------------------------------------------
00037   $Id: psmile_pids.c                                  latour $
00038   $Author: latour $
00039  ---------------------------------------------------------------------- */
00040 
00041   int *mypid;
00042   int *myppid;
00043 {
00044 
00045   pid_t locpid;
00046   pid_t locppid;
00047 
00048   locpid=getpid();
00049   locppid=getppid();
00050 
00051   *mypid = (int)locpid;
00052   *myppid = (int)locppid;
00053 }
00054 
00055 

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1