glibc/hurd
Sergey Bugaev e55a55acb1 hurd: Avoid extra ctty RPCs in init_dtable ()
It is common to have (some of) stdin, stdout and stderr point to the
very same port. We were making the ctty RPCs that _hurd_port2fd () does
for each one of them separately:

1. term_getctty ()
2. mach_port_deallocate ()
3. term_open_ctty ()

Instead, let's detect this case and duplicate the ctty port we already
have. This means we do 1 RPC instead of 3 (and create a single protid
on the server side) if the file is our ctty, and no RPCs instead of 1
if it's not. A clear win!

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-04-17 14:08:12 +02:00
..
hurd hurd: Remove __hurd_local_reply_port 2023-04-14 10:31:22 +00:00
alloc-fd.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
catch-exc.c hurd: Make exception subcode a long 2023-04-03 00:51:42 +02:00
catch-signal.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
compat-20.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ctty-input.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ctty-output.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Depend * Makefile (subdir-target-args): New variable. 2006-02-28 07:11:04 +00:00
dtable.c hurd: Avoid extra ctty RPCs in init_dtable () 2023-04-17 14:08:12 +02:00
exc2signal.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
faultexc.defs Sun May 12 11:16:58 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> 1996-05-12 16:38:08 +00:00
fchroot.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fcntl-internal.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fd-cleanup.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fd-close.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fd-read.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fd-write.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fopenport.c mach, hurd: Cast through uintptr_t 2023-02-12 15:55:04 +01:00
get-host.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
getdport.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
geteuids.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
getumask.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurd-raise.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurd.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdauth.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdchdir.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdexec.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdfault.c hurd: Swap around two function calls 2023-04-03 00:54:35 +02:00
hurdfault.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdfchdir.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdhost.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdid.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdinit.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdioctl.c hurd: Use mach_msg_type_number_t where appropriate 2023-02-12 15:52:07 +01:00
hurdkill.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdlock.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdlock.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdlookup.c hurd: Consolidate file_name_lookup implementation 2023-02-01 20:05:20 +01:00
hurdmalloc.c hurd: Fix static-PIE startup 2021-12-28 10:28:22 +01:00
hurdmalloc.h hurdmalloc: Run fork handler as late as possible [BZ #19431] 2016-09-22 01:45:48 +02:00
hurdmsg.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdpid.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdports.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdprio.c hurd: Use mach_msg_type_number_t where appropriate 2023-02-12 15:52:07 +01:00
hurdrlimit.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdselect.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdsig.c hurd: Fix some broken indentation 2023-03-02 00:32:55 +01:00
hurdsock.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdsocket.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdstartup.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hurdstartup.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
intern-fd.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
intr-msg.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
intr-rpc.defs Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
intr-rpc.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
longjmp-ts.c hurd: Fix file name in #error 2023-04-03 00:55:12 +02:00
lookup-at.c hurd: Implement O_TMPFILE 2023-02-01 23:32:21 +01:00
lookup-retry.c hurd: Disable O_TRUNC and FS_RETRY_MAGICAL in rtld 2023-04-03 00:56:34 +02:00
Makefile hurd: Fix unwinding over INTR_MSG_TRAP in shared too 2023-02-14 19:32:15 +00:00
msgportdemux.c Remove support setting custom demuxers during signal handling. 2023-02-01 23:37:40 +01:00
new-fd.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Notes initial import 1995-02-18 01:27:10 +00:00
openport.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
path-lookup.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
pid2task.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
port2fd.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
port-cleanup.c mach, hurd: Cast through uintptr_t 2023-02-12 15:55:04 +01:00
ports-get.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ports-set.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
preempt-sig.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
privports.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
report-wait.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
RPC_gsync_wait_intr.c hurd: Add __lll_abstimed_wait_intr 2020-12-16 01:58:33 +01:00
set-hooks.h Remove set-hooks.h from generic includes 2023-03-27 13:57:55 -03:00
set-host.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
setauth.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
seteuids.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
siginfo.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigunwind.c hurd: Improve reply port handling when exiting signal handlers 2023-04-10 23:54:28 +02:00
stack_chk_fail_local.c hurd: fix build with -fstack-protector-strong 2017-08-27 22:10:17 +02:00
task2pid.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
thread-cancel.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
thread-self.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
trampoline.c hurd: Do not declare local variables volatile 2023-04-10 20:42:28 +02:00
Versions hurd: Remove __hurd_threadvar_stack_{offset,mask} 2023-04-03 00:53:25 +02:00
vpprintf.c mach, hurd: Cast through uintptr_t 2023-02-12 15:55:04 +01:00
xattr.c hurd: Fix xattr error value 2023-02-12 15:56:21 +01:00