commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 23/43: startup: Improve error handling.


From: Samuel Thibault
Subject: [hurd] 23/43: startup: Improve error handling.
Date: Mon, 11 Sep 2017 07:10:10 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 9a4ccfcd4d4f10df2af538c489294527fc231128
Author: Justus Winter <address@hidden>
Date:   Fri Aug 11 18:17:44 2017 +0200

    startup: Improve error handling.
    
    * startup/startup.c (main): Improve error handling.
---
 startup/startup.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/startup/startup.c b/startup/startup.c
index c76c830..109ed48 100644
--- a/startup/startup.c
+++ b/startup/startup.c
@@ -674,7 +674,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
 int
 main (int argc, char **argv, char **envp)
 {
-  volatile int err;
+  error_t err;
   int i;
   int flags;
   mach_port_t consdev;
@@ -702,8 +702,6 @@ main (int argc, char **argv, char **envp)
       || device_open (device_master, D_READ|D_WRITE, "console", &consdev))
     crash_mach ();
 
-  wire_task_self ();
-
   /* Clear our bootstrap port so our children don't inherit it.  */
   task_set_bootstrap_port (mach_task_self (), MACH_PORT_NULL);
 
@@ -713,6 +711,10 @@ main (int argc, char **argv, char **envp)
     crash_mach ();
   setbuf (stdout, NULL);
 
+  err = wire_task_self ();
+  if (err)
+    error (0, err, "wire_task_self");
+
   err = argz_create (envp, &startup_envz, &startup_envz_len);
   assert_perror_backtrace (err);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]