ref: 0ff4a3e521b43a986447627d8beb7053462bdb1c
parent: 01229e5b52c4532702b891d3bee7e9296e2ad1c2
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Dec 18 17:03:48 EST 2022
venti/srv: open /proc instead of #p
--- a/sys/src/cmd/venti/srv/hproc.c
+++ b/sys/src/cmd/venti/srv/hproc.c
@@ -36,7 +36,7 @@
}
memset(&debug.fhdr, 0, sizeof debug.fhdr);
- snprint(buf, sizeof buf, "#p/%d/text", pid);
+ snprint(buf, sizeof buf, "/proc/%d/text", pid);
fd = open(buf, OREAD);
if(fd < 0)
return -1;
@@ -72,7 +72,7 @@
char buf[100];
Map *m;
- snprint(buf, sizeof buf, "#p/%d/mem", pid);
+ snprint(buf, sizeof buf, "/proc/%d/mem", pid);
mem = open(buf, OREAD);
if(mem < 0)
return nil;
@@ -106,7 +106,7 @@
char buf[4096];
int fd, n;
- snprint(buf, sizeof buf, "#p/%d/fd", getpid());
+ snprint(buf, sizeof buf, "/proc/%d/fd", getpid());
if((fd = open(buf, OREAD)) < 0){
dprint("open %s: %r\n", buf);
return;
--
⑨