diff options
author | Simon Tatham <anakin@pobox.com> | 2022-09-19 14:31:27 +0300 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2022-09-19 13:40:12 +0300 |
commit | ae2c0d40ae61f56994c8d0fc4613ec9758dc2f08 (patch) | |
tree | a43f8166eec03566a17e8b4d0b0d4518c6d625a4 | |
parent | fda41e199093b41f026fb8c06e8e2cddcace4d83 (diff) |
setpgrp cmake check: use #if, not #if defined.
I still haven't got out of the habit of doing this the autotools way,
which doesn't work in cmake. cmake's HAVE_FOO variables are always
defined, and they take values 0 or 1, so testing them with 'defined'
will return the wrong value.
-rw-r--r-- | unix/pageant.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/pageant.c b/unix/pageant.c index 6d125fce..4558cd37 100644 --- a/unix/pageant.c +++ b/unix/pageant.c @@ -330,9 +330,9 @@ void pageant_fork_and_print_env(bool retain_tty) /* Get out of our previous process group, to avoid being * blasted by passing signals. But keep our controlling tty, * so we can keep checking to see if we still have one. */ -#if defined HAVE_NULLARY_SETPGRP +#if HAVE_NULLARY_SETPGRP setpgrp(); -#elif defined HAVE_BINARY_SETPGRP +#elif HAVE_BINARY_SETPGRP setpgrp(0, 0); #endif } else { |