summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-08-15 09:37:59 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-08-29 01:53:02 +0200
commit04de8fc618a34d786db9defde983a7f016538e84 (patch)
tree97b569a2657697b55222cdc80e31de6ed1effe82 /libdiskfs
parent580abff9c280ab91bb05b999f8ea2bda36a55e05 (diff)
libdiskfs: register libdiskfs-based translators as important
Register libdiskfs-based translators running as root as important processes at the proc server. * libdiskfs/init-startup.c (_diskfs_init_completed): Mark us as important.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/init-startup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libdiskfs/init-startup.c b/libdiskfs/init-startup.c
index ff1622f0..bf955d20 100644
--- a/libdiskfs/init-startup.c
+++ b/libdiskfs/init-startup.c
@@ -191,6 +191,13 @@ _diskfs_init_completed ()
if (err)
goto errout;
+ /* Mark us as important. */
+ err = proc_mark_important (proc);
+ /* This might fail due to permissions or because the old proc server
+ is still running, ignore any such errors. */
+ if (err && err != EPERM && err != EMIG_BAD_ID)
+ goto errout;
+
err = proc_getmsgport (proc, HURD_PID_STARTUP, &init);
mach_port_deallocate (mach_task_self (), proc);
if (err)