ref: 6e70be1c167b1182695548d7c55a2ce3a857f5f8
parent: 8c68e442c98edb6c57b43f1cec9046fe0bce19ca
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Aug 2 11:47:24 EDT 2014
iostats: cannot spy on fd 0,1,2 as /fd is per process
--- a/sys/src/cmd/iostats.c
+++ b/sys/src/cmd/iostats.c
@@ -308,12 +308,8 @@
bind("#c/pid", "/dev/pid", MREPL); bind("#c/ppid", "/dev/ppid", MREPL); bind("#e", "/env", MREPL|MCREATE);- close(0);
- close(1);
- close(2);
- open("/fd/0", OREAD);- open("/fd/1", OWRITE);- open("/fd/2", OWRITE);+ bind("#d", "/fd", MREPL);+
if(chdir(buf) < 0)
sysfatal("chdir");exec(*argv, argv);
--
⑨