Re: [9fans] Inferno: starting a process in a stopped state

2024-08-04 Thread Edouard Klein
OK, my echo stop <>/prog/33/dbgctl was wrong. It opens /prog/33/dbgctl for writing and reading, but only reads from it, output still goes to the standard output. Here what I came up with next: echo stop <>[5]/prog/4/dbgctl >[1=5] This opens /prog/4/dbgctl RW on FD 5, and then redirects the stan

Re: [9fans] Inferno: starting a process in a stopped state

2024-08-04 Thread Edouard Klein
For the sake of people stumbling on this post a long time from now: I solved my immediate problem by running: echo stop <>/prog/33/dbgctl The <> redirection opens the file for reading and writing, not just for writing, and solves the "permission denied" issue. However, Inferno's sh(1) man pages

Re: [9fans] Inferno: starting a process in a stopped state

2024-08-03 Thread Edouard Klein
Thanks Ron :) In DIS assembly, this is written as jmp $0, which can be changed to jmp $1 when I want to disable the loop and spare myself from decreasing all PC offsets in the code. Now, I have another problem: /prog/N/dbgctl can't be written to :/ Here is how to reproduce: Save the file belo

Re: [9fans] Inferno: starting a process in a stopped state

2024-07-24 Thread ron minnich
I put a 1:jump 1 At the start, when I need to do this and have no other way. On Mon, Jul 22, 2024 at 01:28 Edouard Klein wrote: > Hi ! > > I'm writing dis assembly, and I would like to debug my program right > from the entrypoint. > > I intend to use the /prog filesystem for that, thanks to

[9fans] Inferno: starting a process in a stopped state

2024-07-22 Thread Edouard Klein
Hi ! I'm writing dis assembly, and I would like to debug my program right from the entrypoint. I intend to use the /prog filesystem for that, thanks to which one can stop a program by echoing "stop" to dbgctl file. However, what I need to do is stop the program at the very start. I have multipl