in reply to What is responsible for a

There was a similar thread a while back about this sort of thing. I don't think it was ever resolved there, though, but you might gleam something useful:

Hidden Characters?

I would be interested in knowing what OS and version you are using, the type of filesystem you're using there, and a clarification that the script you're seeing this error with is a Perl script and not another executable. Seeing your #! line and knowing the location and version of your Perl executable might be interesting also.

Replies are listed 'Best First'.
Re: Re: What is responsible for a
by Anonymous Monk on Dec 15, 2000 at 20:17 UTC
    Actually, this idea that it might be caused by strange Win32 characters staying in the file might be right. I'm running the script on FreeBSD 4.1.1 with Apache, but I do most of the editing on a Win98 machine using Homesite. I don't ftp the script to the BSD box, because I have Samba running on it, and so access the box through a share.

    The error is definitely with the script, not with another executable.

    The #! line is:
    #!/usr/bin/perl -w
    and using Perl 5.

      Both of you share this theory, so I suppose it isn't groundless, but it is inconsistent with the nature of the error message itself. The message "Text file busy" is a system error message given exceedingly rarely and under very specific circumstances.

      He was running Linux, you're running FreeBSD, so it's unlikely an OS thing or a filesystem thing. "Perl 5" doesn't help nail down a common version there (5.00503? 5.004? 5.6.0?).

      Try doing what he did when you get this error message. Try just copying the file to a new name and copying it back (using a simple 'cp'). If the problem goes away, it's very unlikely that it has anything to do with the content. If it doesn't fix it, then it could possibly be content-related.

      So if we eliminate the OS, eliminate the filesystem (by eliminating the OS), and eliminate the content, the only thing left is the "way" that the file was saved or a bug with Perl. We'd need to do more investigating.

      If you have 'strace' or 'truss' on your system, I would be very interested to see precisely what syscall is involved in that error message. If it's acting on a file descriptor, back-track until you can find the open statement involved.