summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_rtld.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-03-21 06:46:16 +0000
committerkib <kib@FreeBSD.org>2016-03-21 06:46:16 +0000
commit1e240521d214b088e33747a9cf9abbc4baae993f (patch)
treeee79c95a5699a3d95b3bb0057274100a44afc747 /lib/libthr/thread/thr_rtld.c
parent9e847808a65ae1c95f6f166ab77d0c6f77b0e58c (diff)
downloadFreeBSD-src-1e240521d214b088e33747a9cf9abbc4baae993f.zip
FreeBSD-src-1e240521d214b088e33747a9cf9abbc4baae993f.tar.gz
From libthr, remove special and strange code to set up session and
control terminal, activated when running with pid 1. It is application duty to handle this, and unsuspecting init replacements which are linked with libthr would be broken by this. The pre-resolving of getpid() is restored, just in case. Reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'lib/libthr/thread/thr_rtld.c')
-rw-r--r--lib/libthr/thread/thr_rtld.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c
index cb20098..6c407d1 100644
--- a/lib/libthr/thread/thr_rtld.c
+++ b/lib/libthr/thread/thr_rtld.c
@@ -227,6 +227,7 @@ _thr_rtld_init(void)
_rtld_atfork_post(NULL);
_malloc_prefork();
_malloc_postfork();
+ getpid();
syscall(SYS_getpid);
/* mask signals, also force to resolve __sys_sigprocmask PLT */
OpenPOWER on IntegriCloud