--- Begin Message ---
Subject: |
Tail claims bad file descriptor when following |
Date: |
Fri, 26 Nov 2010 10:44:28 +0200 |
Hi there,
I use tail 5.3.0 in Windows 7. It works fine unless I try to follow a file.
Here is my --version output:
tail (GNU coreutils) 5.3.0
Written by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Meyering.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The following works as expected with no error messages.
tail \\ssb-batman\logs\batman\build.log
However, if I try to follow, it gives output as follows.
C:\>tail -f \\ssb-batman\logs\batman\build.log
[INFO] Unpacking C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb\postgen\target\postgen-izpack.zip to
C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb_installer\target\staging
with includes null and excludes:null
[INFO] Unpacking C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb\scheduleinjector\target\scheduleinjector-izpack.zip to
C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb_installer\target\staging
with includes null and excludes:null
[INFO] Unpacking C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb\services\target\services-izpack.zip to
C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb_installer\target\staging
with includes null and excludes:null
tail: \\ssb-batman\logs\batman\build.log: Bad file descriptor
Why is tail suddenly claiming that the file descriptor is bad, when clearly it works just fine?
So I tried some different things to see if I could get it to work.
I tried
tail --follow=\\ssb-batman\logs\batman\build.log
but that just gives an even stranger error:
tail: invalid argument `\\\\ssb-batman\\logs\\batman\\build.log' for `--follow'
Try `tail --help' for more information.
I thought at first that maybe tail does not like the UNC path, but that is not the case - it does exactly the same when I use a local file.
If I add --retry to the mix, I get the following very interesting reaction: It prints out the last few lines, throws out the same error as before, then prints out the entire file! This is what it looks like:
C:\>tail -f "\\ssb-batman\logs\batman\build.log" --retry
tail: warning: --retry is useful only when following by name
[INFO] CfgSystemInfoExt ...................................... SUCCESS [4.328s]
[INFO] SSB Installer ......................................... SUCCESS [1:28.422s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22 minutes 54 seconds
[INFO] Finished at: Fri Nov 26 10:11:17 GMT+02:00 2010
[INFO] Final Memory: 66M/1016M
[INFO] ------------------------------------------------------------------------
tail: \\ssb-batman\logs\batman\build.log: Bad file descriptor
tail: `\\ssb-batman\logs\batman\build.log' has become accessible
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Postilion Parent POM
<snip snip...>
In the interests of brevity I cut out the rest of my 250KB log file :-)
Regards,
Johan
--
Johan Pretorius
Cell: 0829268327
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#7483: Tail claims bad file descriptor when following |
Date: |
Sat, 23 Jul 2011 00:21:35 +0200 |
tags 7483 + notabug
close 7483
thanks
Paul Eggert wrote:
> On 11/26/2010 12:44 AM, Johan Pretorius wrote:
>> I use tail 5.3.0 in Windows 7.
>
> Hmm, that's rather old. I suggest upgrading to a more-recent
> version before investigating further. The current version is 8.7.
>
> Also, you might try reporting the bug to whoever built it on Windows
> rather than to bug-coreutils, as it could well be a property
> of the Windows port rather than a bug in coreutils itself.
Thanks for the report.
I'm closing this as "not a bug".
If you find evidence of a bug using the latest,
you might want to report it to whomever wrote packaged
coreutils for windows 7.
--- End Message ---