Re: [9fans] fd and /srv filesystem

2023-10-04 Thread Chris McGee
Thanks all for the explanations. I think I understand better now. Chris > On Oct 4, 2023, at 12:06 PM, o...@eigenstate.org wrote: > > Quoth Chris McGee : >> Hi All, >> >> I was thinking about file descriptors in the context of Plan 9. On Unix an >> fd is generally only usable by the current pr

Re: [9fans] Problem with outputing from kernel

2023-10-04 Thread Kurt H Maier via 9fans
On Wed, Oct 04, 2023 at 07:18:23AM -0400, dusan3...@gmail.com wrote: > Also I was doing with tail -f /dev/kmesg in the background and without that > /dev/kmesg loses the start of output up to some random moment where it shows > it. Could the problem be that i have too many outputs? try tail +0f

Re: [9fans] fd and /srv filesystem

2023-10-04 Thread ori
Quoth Chris McGee : > Hi All, > > I was thinking about file descriptors in the context of Plan 9. On Unix an > fd is generally only usable by the current process, and child ones through > a fork with some special incantation if one wants to communicate one over a > domain socket. This is possibly

Re: [9fans] Problem with outputing from kernel

2023-10-04 Thread ori
Quoth dusan3...@gmail.com: > I added some logs in /sys/src/9/port/proc.c for some tests of the scheduler, > I want to see at what moments do real time processes take the cpu. I did that > with simple prints with the intention of doing cat /dev/kmesg > someFile > because all the prints are stored

Re: [9fans] fd and /srv filesystem

2023-10-04 Thread hiro
btw it's very common on unix to share FDs in multi-threaded programs. and all the pain resulting from un-synchronised FD access is available as expected :) On 10/4/23, hiro <23h...@gmail.com> wrote: > file descriptors describe to the kernel which of the files you > previously open()'ed (a syscall)

Re: [9fans] fd and /srv filesystem

2023-10-04 Thread hiro
file descriptors describe to the kernel which of the files you previously open()'ed (a syscall) you want to operator on. it's not about security: if you want to operate on a file that another process might have opened before, you have to be careful that the other process isn't writing to the same

[9fans] Problem with outputing from kernel

2023-10-04 Thread dusan3sic
I added some logs in /sys/src/9/port/proc.c for some tests of the scheduler, I want to see at what moments do real time processes take the cpu. I did that with simple prints with the intention of doing cat /dev/kmesg > someFile because all the prints are stored there.  The problem is that the

[9fans] fd and /srv filesystem

2023-10-04 Thread Chris McGee
Hi All, I was thinking about file descriptors in the context of Plan 9. On Unix an fd is generally only usable by the current process, and child ones through a fork with some special incantation if one wants to communicate one over a domain socket. This is possibly for security reasons, avoiding o