From d02b624edb4dc7d24d053279789559a55eca1094 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 13 Mar 2000 23:53:18 +0000 Subject: 2000-03-13 Roland McGrath * stubs.c (send_signal): Make MESSAGE auto instead of static. Take new argument TIMEOUT, passed to mach_msg instead of zero. (send_signal): For MACH_SEND_TIMED_OUT failure, destroy the pseudo-received message to avoid leaking send rights. * init.c (process_signal): Pass new argument, timeout of 500 ms. --- init/init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'init/init.c') diff --git a/init/init.c b/init/init.c index 3ec1270b..70453a90 100644 --- a/init/init.c +++ b/init/init.c @@ -1,6 +1,6 @@ /* Start and maintain hurd core servers and system run state - Copyright (C) 1993,94,95,96,97,98,99 Free Software Foundation, Inc. + Copyright (C) 1993,94,95,96,97,98,99,2000 Free Software Foundation, Inc. This file is part of the GNU Hurd. The GNU Hurd is free software; you can redistribute it and/or modify @@ -1061,7 +1061,8 @@ frob_kernel_process (void) pid_t child_pid; /* PID of the child we run */ task_t child_task; /* and its (original) task port */ -error_t send_signal (mach_port_t msgport, int signal, mach_port_t refport); +error_t send_signal (mach_port_t msgport, int signal, mach_port_t refport, + mach_msg_timeout_t); static void launch_something (const char *why); @@ -1152,7 +1153,8 @@ process_signal (int signo) error (0, err, "proc_getmsgport"); else { - err = send_signal (msgport, signo, task); /* Avoids blocking. */ + err = send_signal (msgport, signo, task, + 500); /* Block only half a second. */ mach_port_deallocate (mach_task_self (), msgport); if (err) { -- cgit v1.2.3