Reverted and applied Simon's xcore patch
authorReto Achermann <acreto@student.ethz.ch>
Sun, 3 Aug 2014 14:53:30 +0000 (16:53 +0200)
committerStefan Kaestle <stefan.kaestle@inf.ethz.ch>
Thu, 21 Aug 2014 08:47:50 +0000 (10:47 +0200)
commit7b1c61d7524dfd6b6e2148b7c553f7a4162c55b6
tree13ef969b8f96714b2d9ee58e7338bbb1b62401ce
parentee197fe0f3f77595c12526640538472c0a0b83d1
Reverted and applied Simon's xcore patch

diff --git a/lib/barrelfish/spawn_client.c
b/lib/barrelfish/spawn_client.c
index 6365801..05ccb30 100644
--- a/lib/barrelfish/spawn_client.c
+++ b/lib/barrelfish/spawn_client.c
@@ -21,6 +21,7 @@
 #include <barrelfish/spawn_client.h>
 #include <barrelfish/cpu_arch.h>
 #include <if/spawn_rpcclient_defs.h>
+#include <if/monitor_defs.h>
 #include <vfs/vfs_path.h>

 extern char **environ;
@@ -189,6 +190,13 @@ errval_t spawn_program_with_caps(coreid_t coreid,
const char *path,
         path = pathbuf;
     }

+    // XXX: HACK: change waitset on monitor binding temporarily so we
get UMP
+    // cap transfer notifications!
+    struct monitor_binding *mb = get_monitor_binding();
+    struct waitset *mon_ws = mb->waitset;
+    mb->change_waitset(mb, &cl->rpc_waitset);
+
+
     if (capref_is_null(inheritcn_cap) && capref_is_null(argcn_cap)) {
         err = cl->vtbl.spawn_domain(cl, path, argstr, argstrlen,
                                     envstr, envstrlen,
@@ -203,13 +211,15 @@ errval_t spawn_program_with_caps(coreid_t coreid,
const char *path,
     if (err_is_fail(err)) {
         USER_PANIC_ERR(err, "error sending spawn request");
     } else if (err_is_fail(msgerr)) {
-        return msgerr;
+        goto out;
     }

     if (ret_domainid != NULL) {
         *ret_domainid = domain_id;
     }

+out:
+    mb->change_waitset(mb, mon_ws);
     return msgerr;
 }
if/spawn.if
lib/barrelfish/spawn_client.c
usr/spawnd/service.c