Go to the documentation of this file.00001 #include <grass/config.h>
00002
00003 #include <unistd.h>
00004 #include <grass/gis.h>
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 int G_fork(void)
00019 {
00020 #ifdef __MINGW32__
00021 return -1;
00022 #else
00023 int pid;
00024
00025 pid = fork();
00026
00027
00028
00029
00030
00031
00032 if (pid == 0)
00033 #ifdef SETPGRP_VOID
00034 setpgrp();
00035 #else
00036 setpgrp(0, getpid());
00037 #endif
00038
00039 return pid;
00040
00041 #endif
00042
00043 }