[vte] build: Remove unncessary feature test
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] build: Remove unncessary feature test
- Date: Sat, 12 Oct 2019 18:12:50 +0000 (UTC)
commit b87c6f49ea0dda0c6bc7a274e389597af096718f
Author: Christian Persch <chpe src gnome org>
Date: Sat Oct 12 20:10:55 2019 +0200
build: Remove unncessary feature test
getpgid() is in POSIX, so just depend on its presence.
meson.build | 2 --
src/vte.cc | 3 +--
src/vtegtk.cc | 3 +--
3 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/meson.build b/meson.build
index d56334d6..a479f10f 100644
--- a/meson.build
+++ b/meson.build
@@ -183,8 +183,6 @@ foreach func: check_functions_required
endforeach
check_functions = [
- # Misc PTY handling functions
- 'getpgid',
# Misc I/O routines.
'explicit_bzero',
'pread',
diff --git a/src/vte.cc b/src/vte.cc
index abbead5a..6bd1cadd 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -10200,12 +10200,11 @@ Terminal::terminate_child() noexcept
if (m_pty_pid == -1)
return false;
-#ifdef HAVE_GETPGID
auto pgrp = getpgid(m_pty_pid);
if (pgrp != -1) {
kill(-pgrp, SIGHUP);
}
-#endif
+
kill(m_pty_pid, SIGHUP);
m_pty_pid = -1;
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index e3bff16b..be8db362 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -2755,13 +2755,12 @@ spawn_async_cb (GObject *source,
if (terminal == nullptr) {
/* If the terminal was destroyed, we need to abort the child process, if any */
if (pid != -1) {
-#ifdef HAVE_GETPGID
pid_t pgrp;
pgrp = getpgid(pid);
if (pgrp != -1) {
kill(-pgrp, SIGHUP);
}
-#endif
+
kill(pid, SIGHUP);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]