Merge pull request #100 from ktdreyer/kadmin-systemd-setpgid

kadmin: handle systemd setpgid failure
This commit is contained in:
Love Hörnquist Åstrand
2014-08-22 21:31:32 -07:00

View File

@@ -189,7 +189,8 @@ wait_for_connection(krb5_context contextp,
pgrp = getpid();
if(setpgid(0, pgrp) < 0)
/* systemd may cause setpgid to fail with EPERM */
if(setpgid(0, pgrp) < 0 && errno != EPERM)
err(1, "setpgid");
signal(SIGTERM, terminate);