[mythtv-users] Changing end time for a recording while the recording is going on

Mike Hicks hick0088 at tc.umn.edu
Wed Oct 15 00:44:50 EDT 2003


On Sat, 2003-10-11 at 05:51, Tako Schotanus wrote:  
> Not only that, but the .nuv filename for the recording is based on the
> begin and end date/times so just changing the end time will confuse
> MythTV as to which file belong to the recording. When I implemented
> the "Stop Recording" feature I had to add code that actually renamed
> the file to mirror the changes I made in the start/end times. It might
> be necessary to do something similar for a feature like this as well,
> but I can imagine there might be complication when trying to do so for
> an in-progress recording.

In Linux, I believe it is legal to rename a file while it is being
written/read, as long as you aren't closing it and reopening it.  What
matters is that your file descriptor still points to the appropriate
string of blocks on the disk.  The filename is really just a pointer to
an inode, if I remember right.  If you're worried about it, just make a
hard link instead...

Actually, some programs will delete a file just after creating it,
occasionally as a security measure to prevent other programs from
accessing the data.  There is no filename, but the file exists until it
is closed.  I seem to recall an old version of Myth doing something like
this, because I'd suddenly find my root filesystem totally full, but I
couldn't find any big file that was causing the problem.  (like I said,
that was an old version, and I don't have that problem anymore)

-- 
 _  _  _  _ _  ___    _ _  _  ___ _ _  __   Good Lord, the little
/ \/ \(_)| ' // ._\  / - \(_)/ ./| ' /(__   stoner's got a point.
\_||_/|_||_|_\\___/  \_-_/|_|\__\|_|_\ __)  
[ Mike Hicks | http://umn.edu/~hick0088/ | mailto:hick0088 at tc.umn.edu ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20031014/3692d5ee/attachment.pgp


More information about the mythtv-users mailing list