diff --git a/config2.h.in b/config2.h.in
index e862359ac..a25efbb74 100644
--- a/config2.h.in
+++ b/config2.h.in
@@ -448,9 +448,6 @@
 /* Define to 1 if you have the `getpgrp' function. */
 #mesondefine HAVE_GETPGRP
 
-/* Define to 1 if you have the `getpid' function. */
-#mesondefine HAVE_GETPID
-
 /* Define to 1 if you have the `getpwnam' function. */
 #mesondefine HAVE_GETPWNAM
 
diff --git a/configure.ac b/configure.ac
index 6d50eca32..7b8daaf4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -336,7 +336,6 @@ AC_CHECK_FUNCS(mkstemps)
 # These aren't probably needed now, as they are commented in links.h.
 # I've no idea about their historical background, but I keep them here
 # just in the case they will help later. --pasky
-AC_CHECK_FUNCS(getpid, HAVE_GETPID=yes)
 AC_CHECK_FUNCS(setpgid getpgid setpgrp getpgrp)
 AC_CHECK_FUNCS(raise, HAVE_RAISE=yes)
 AC_CHECK_FUNCS(kill, HAVE_KILL=yes)
@@ -346,7 +345,7 @@ AC_CHECK_FUNCS(fpathconf, HAVE_FPATHCONF=yes)
 AC_CHECK_FUNCS(poll, HAVE_POLL=yes)
 
 if test x"$HAVE_RAISE" = x; then
-	if test x"$HAVE_KILL" = x || test x"$HAVE_GETPID" = x; then
+	if test x"$HAVE_KILL" = x; then
 		AC_MSG_ERROR([Unable to emulate raise()])
 	fi
 fi
diff --git a/meson.build b/meson.build
index de865268f..494e8e122 100644
--- a/meson.build
+++ b/meson.build
@@ -862,10 +862,6 @@ if not conf_data.get('CONFIG_OS_DOS') and compiler.has_function('fork', prefix :
     conf_data.set('HAVE_FORK', 1)
 endif
 
-if compiler.has_function('getpid', prefix : '#include <unistd.h>')
-    conf_data.set('HAVE_GETPID', 1)
-endif
-
 if compiler.has_function('setpgid', prefix : '#include <unistd.h>')
     conf_data.set('HAVE_SETPGID', 1)
 endif
diff --git a/src/main/interlink.c b/src/main/interlink.c
index b7511d9f5..01b834f3c 100644
--- a/src/main/interlink.c
+++ b/src/main/interlink.c
@@ -544,9 +544,7 @@ init_interlink(void)
 			return -1;
 		}
 		/* child */
-#ifdef HAVE_GETPID
 		master_pid = getpid();
-#endif
 		close_terminal_pipes();
 	}
 	bind_to_af_unix();
diff --git a/src/main/main.c b/src/main/main.c
index 1edda096e..513ac878c 100644
--- a/src/main/main.c
+++ b/src/main/main.c
@@ -195,9 +195,7 @@ init(void)
 	    || get_cmd_opt_bool("source")
 	    || (fd = init_interlink()) == -1) {
 
-#ifdef HAVE_GETPID
 		master_pid = getpid();
-#endif
 		parse_options_again();
 		init_b = 1;
 		init_modules(builtin_modules);
diff --git a/src/osdep/stub.c b/src/osdep/stub.c
index 94110824d..d279b424f 100644
--- a/src/osdep/stub.c
+++ b/src/osdep/stub.c
@@ -224,7 +224,7 @@ elinks_memrchr(const void *s, int c, size_t n)
 
 #ifndef HAVE_RAISE
 
-#if !defined(HAVE_KILL) || !defined(HAVE_GETPID)
+#if !defined(HAVE_KILL)
 #error The raise() stub function requires kill() and getpid()
 #endif