I have modified fshelp_start_translator_long to pass the task port for
the translator to the call back function. This works fine if a debugger
is no attached to either the translator or the settrans. When I do, the
translator gets MACH_PORT_NULL when it does a getport call. Here is
some output:
neal@hurd:~ (0)$ settrans -acgP foo /hurd/ext2fs part/7
Translator pid: 199
Pausing... <-- Attach gdb
ext2fs: ../../project/hurd/hurd-build/libdiskfs/init-startup.c:178:
_diskfs_init_completed: Assertion `proc' failed.
neal@hurd:~ (0)$
If I do not attach a debugger, everything works correctly:
neal@hurd:~ (0)$ settrans -acgP foo /hurd/ext2fs part/7
Translator pid: 213
Pausing... <-- Just hit enter
neal@hurd:~ (0)$ ls foo
lost+found
neal@hurd:~ (0)$
The callback function does the following:
if (pause)
{
fprintf (stderr, "Translator pid: %d\nPausing...", task2pid (task));
getchar ();
}
Thus, all that has been added is the call to task2pid.
Any ideas?
PGP signature