From 8ac4c6030d74f36973507071c9fa1d2ccdb0d6b5 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Sat, 28 Oct 2023 01:20:51 +0200 Subject: [PATCH] getpgrp() tcgetpgrp() are unix specific: protect with #ifdef __unix__ --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.c b/src/main.c index 02debf80..88527cd0 100644 --- a/src/main.c +++ b/src/main.c @@ -96,10 +96,12 @@ int main(int argc, char **argv) #endif argc = process_options(argc, argv); + #ifdef __unix__ /* if invoked in background detach from console */ if(getpgrp() != tcgetpgrp(STDOUT_FILENO) && !cli_opt_no_readline) { cli_opt_detach = 1; } + #endif my_strdup(_ALLOC_ID_, &xschem_executable, argv[0]); if(debug_var>=1 && !has_x)