[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 47/98: libfshelp: improve error handling in fshelp_start_translat
From: |
Samuel Thibault |
Subject: |
[hurd] 47/98: libfshelp: improve error handling in fshelp_start_translator_long |
Date: |
Tue, 14 Jan 2014 02:00:01 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 34ff01a84390ba7a5c0377c326944fc026d66140
Author: Justus Winter <address@hidden>
Date: Mon Nov 25 17:01:30 2013 +0100
libfshelp: improve error handling in fshelp_start_translator_long
Properly deallocate all ports and terminate the started translator if
an error occurs.
* libfshelp/start-translator-long.c (fshelp_start_translator_long):
Improve error handling.
---
libfshelp/start-translator-long.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libfshelp/start-translator-long.c
b/libfshelp/start-translator-long.c
index 55fb0ff..64a20be 100644
--- a/libfshelp/start-translator-long.c
+++ b/libfshelp/start-translator-long.c
@@ -285,10 +285,7 @@ fshelp_start_translator_long (fshelp_open_fn_t
underlying_open_fn,
ports[INIT_PORT_BOOTSTRAP] = saveport;
if (err)
- {
- task_terminate (task);
- goto lose;
- }
+ goto lose_task;
/* Ask to be told if TASK dies. */
err =
@@ -297,13 +294,17 @@ fshelp_start_translator_long (fshelp_open_fn_t
underlying_open_fn,
bootstrap, MACH_MSG_TYPE_MAKE_SEND_ONCE,
&prev_notify);
if (err)
- return err;
+ goto lose_task;
/* Ok, cool, we've got a running(?) program, now rendezvous with it if
possible using the startup protocol on the bootstrap port... */
err = service_fsys_startup(underlying_open_fn, cookie, bootstrap,
timeout, control, task);
+ lose_task:
+ if (err)
+ task_terminate (task);
+
lose:
if (!ports_moved)
{
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 29/98: libps: fix the length computation in fprint_frac_value, (continued)
- [hurd] 29/98: libps: fix the length computation in fprint_frac_value, Samuel Thibault, 2014/01/13
- [hurd] 27/98: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, Samuel Thibault, 2014/01/13
- [hurd] 35/98: libshouldbeinlibc: fix error handling in maptime_map, Samuel Thibault, 2014/01/13
- [hurd] 25/98: libports: implement lockless management of threads, Samuel Thibault, 2014/01/13
- [hurd] 33/98: usermux: actually use the computed flags value in netfs_attempt_utimes, Samuel Thibault, 2014/01/13
- [hurd] 32/98: nfsd: fix error handling in op_remove, Samuel Thibault, 2014/01/13
- [hurd] 30/98: fatfs: fix error handling in diskfs_lookup_hard, Samuel Thibault, 2014/01/13
- [hurd] 42/98: libports: improve error handling in ports_transfer_right, Samuel Thibault, 2014/01/13
- [hurd] 43/98: libdiskfs: improve error reporting in diskfs_start_disk_pager, Samuel Thibault, 2014/01/13
- [hurd] 44/98: libports: improve error reporting in adjust_priority, Samuel Thibault, 2014/01/13
- [hurd] 47/98: libfshelp: improve error handling in fshelp_start_translator_long,
Samuel Thibault <=
- [hurd] 46/98: proc: store the device master port in _hurd_device_master, Samuel Thibault, 2014/01/13
- [hurd] 50/98: libnetfs: improve the netfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 31/98: fatfs: fix error handling in diskfs_get_directs, Samuel Thibault, 2014/01/13
- [hurd] 51/98: libtrivfs: improve the trivfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 24/98: Clean up the included header files, Samuel Thibault, 2014/01/13
- [hurd] 54/98: pfinet: improve the pfinet_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 52/98: exec: improve the exec_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 34/98: mach-defpager: drop all register qualifiers, Samuel Thibault, 2014/01/13
- [hurd] 49/98: libdiskfs: improve the diskfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 56/98: auth: improve the auth_demuxer function, Samuel Thibault, 2014/01/13