#3745: Preferences : "[x] Warn upon closing active programs" ------------------------------------+--------------------------------------- Reporter: mmadia | Owner: jackburton Type: enhancement | Status: new Priority: normal | Milestone: R1 Component: Applications/Terminal | Version: R1/pre-alpha1 Resolution: | Keywords: Blocked By: | Has a Patch: 0 Platform: All | Blocking: ------------------------------------+--------------------------------------- Comment (by jackburton): Replying to [comment:5 bonefish]: > You might be interested in [http://www.opengroup.org/onlinepubs/9699919799/functions/tcgetpgrp.html tcgetpgrp()]. If the terminal's foreground group is not the shell, then something else is actively running. Ah yes, that works well. Thanks! >That doesn't catch stopped or background jobs, though. I see. > You could test what Gnome Terminal does in these situations. Well, or look in its source code. It might make use of procfs, though, which we don't have. I just tested on the opensuse 11.0 I have here, and Terminal doesn't ask anything on exit, not even if there are active children. On the Ubuntu 10.4 I have at home, though, it does. So I guess it depends on how it's compiled. Will test it later. -- Ticket URL: <http://dev.haiku-os.org/ticket/3745#comment:6> Haiku <http://dev.haiku-os.org> Haiku - the operating system.