IRC channel logs

2026-03-22.log

back to list of logs

<nexussfan>> #ifdef __MACH__
<AlmuHS>?
<sneek>Welcome back AlmuHS, you have 1 message!
<sneek>AlmuHS, Gooberpatrol_66 says: try the osf mach documentation listed here https://www.gnu.org/software/hurd/microkernel/mach/mig/documentation.html
<AlmuHS>Gooberpatrol_66: thanks, i will check this
<nexussfan>pandoc fails to build on hurd?
<nexussfan>*works on i386
<nexussfan>but not amd64
<nexussfan>> ghc-9.10.3: heap overflow
<nexussfan>> E: Build killed with signal TERM after 180 minutes of inactivity
<AlmuHS>i've got to fix the bootstrap_ipc example, and expanded to send strings.
<AlmuHS>This is the code: https://paste.debian.net/hidden/9f39664e
<AlmuHS>What do I need to make this work as a translator?
<damo22>AlmuHS: see the hello translator for an example
<nexussfan>does LD_PRELOAD exist for hurd?
<AlmuHS>damo22: but hello translator use trivfs. I want to avoid it
<AlmuHS> https://cgit.git.savannah.gnu.org/cgit/hurd/hurd.git/tree/trans/hello.c
<nexussfan>fakeroot.c and symlink.c are not using trivfs
<AlmuHS>maybe symlink.c can be useful for me
<AlmuHS>i want to modify my current code to write to a file
<AlmuHS>but loading as a translator
<AlmuHS>fsys can be enough for this, i think
<AlmuHS>maybe libio is better https://cgit.git.savannah.gnu.org/cgit/hurd/hurd.git/tree/hurd/io.defs
<damo22>a translator is suitable when you have a process that needs to run via opening a node and reading writing to something not on the filesystem
<AlmuHS>yes, i know
<AlmuHS>this is done here, by example: https://cgit.git.savannah.gnu.org/cgit/hurd/hurd.git/tree/trans/symlink.c#n81
<AlmuHS>mach_port_t bootstrap; mach_port_t control; error_t err; /* Parse our options... */ argp_parse (&argp, argc, argv, 0, 0, 0); task_get_bootstrap_port (mach_task_self (), &bootstrap); if (bootstrap == MACH_PORT_NULL) error (1, 0, "Must be started as a translator");
<AlmuHS> mach_port_t bootstrap;
<AlmuHS> mach_port_t control;
<AlmuHS> error_t err;
<AlmuHS> /* Parse our options... */
<AlmuHS> argp_parse (&argp, argc, argv, 0, 0, 0);
<AlmuHS> task_get_bootstrap_port (mach_task_self (), &bootstrap);
<AlmuHS> if (bootstrap == MACH_PORT_NULL)
<AlmuHS> error (1, 0, "Must be started as a translator");
<AlmuHS> linktarget = argv[1];
<AlmuHS> /* Reply to our parent */
<AlmuHS> mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &control);
<AlmuHS> mach_port_insert_right (mach_task_self (), control, control,
<AlmuHS> MACH_MSG_TYPE_MAKE_SEND);
<AlmuHS> err =
<AlmuHS> fsys_startup (bootstrap, 0, control, MACH_MSG_TYPE_COPY_SEND, &realnode);
<AlmuHS> mach_port_deallocate (mach_task_self (), control);
<AlmuHS> mach_port_deallocate (mach_task_self (), bootstrap);
<AlmuHS> if (err)
<AlmuHS> error (1, err, "Starting up translator");
<AlmuHS>the fsys_startup() can be replaced by another, depending whatever you wants to make in the translator
<nexussfan>qoth soon :D
<Gooberpatrol_66>:D
<nexussfan>hopefully classicube/hurd gets on there ;)
<azert>hello
<azert>is it possible for a Hurd translator to “personalize” content in function of the task asking for it?
<azert>in other words, does the translator know who made the rpc?
<azert>for open, or read?
<youpi>the rpc, no
<youpi>the open, yes
<azert>what is the difference?
<azert>How to get this info on open?
<youpi>one can pass an opened fd to another process through a unix socket
<youpi>see dir_lookup, which has a struct protid *
<youpi>e.g. diskfs_S_dir_lookup