From d12cc17afd5ee2c9b589cf5ceb632a98e6f31ecf Mon Sep 17 00:00:00 2001 From: Epoch Qwert Date: Mon, 22 Sep 2014 01:25:27 -0500 Subject: made changetail also go by inode when matching for tails to change. --- segfault.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/segfault.c b/segfault.c index ed9818e..926c93d 100644 --- a/segfault.c +++ b/segfault.c @@ -385,8 +385,10 @@ void c_leettail(int fd,char *from,char *file,struct user *user,...) { } void c_changetail(int fd,char *from,char *line,struct user *user,...) { + struct stat st; char *merp=0; int i; + int fdd; char *mode=0; //if(line == 0) return mywrite(fd,"QUIT :line == 0 in changetail\r\n"); //if(from == 0) return mywrite(fd,"QUIT :from == 0 in changetail\r\n"); @@ -398,10 +400,12 @@ void c_changetail(int fd,char *from,char *line,struct user *user,...) { mode++; } } + fdd=open(line,O_RDONLY|O_NONBLOCK,0);//HAVE to open named pipes as nonblocking. + fstat(fdd,&st); for(i=0;i