Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143654506
D30667.id91971.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
763 B
Referenced Files
None
Subscribers
None
D30667.id91971.diff
View Options
Index: usr.bin/tail/tail.c
===================================================================
--- usr.bin/tail/tail.c
+++ usr.bin/tail/tail.c
@@ -268,8 +268,22 @@
if (rflag)
reverse(stdin, fn, style, off, &sb);
- else
- forward(stdin, fn, style, off, &sb);
+ else {
+ if (fflag) {
+ file = (struct file_info *) malloc(sizeof(struct file_info));
+ if (!file)
+ err(1, "Couldn't malloc space for file descriptors.");
+ file->file_name = strdup(fn);
+ if (! file->file_name)
+ errx(1, "Couldn't malloc space for file name.");
+ file->fp = stdin;
+ follow(file, style, off);
+ free(file->file_name);
+ free(file);
+ } else {
+ forward(stdin, fn, style, off, &sb);
+ }
+ }
}
fileargs_free(fa);
exit(rval);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 1, 4:34 AM (17 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28275559
Default Alt Text
D30667.id91971.diff (763 B)
Attached To
Mode
D30667: fix tail -f on stdin
Attached
Detach File
Event Timeline
Log In to Comment