added setsid() to properly detach from console
[strongswan.git] / src / starter / starter.c
index 0bf1d7a..f84d413 100644 (file)
@@ -276,6 +276,7 @@ int main (int argc, char **argv)
                    dup2(fnull, STDERR_FILENO);
                    close(fnull);
                }
                    dup2(fnull, STDERR_FILENO);
                    close(fnull);
                }
+               setsid(); 
            }
            break;
            case -1:
            }
            break;
            case -1: