[Asterisk-Users] Outgoing spool file ignored

tim panton tpanton at attglobal.net
Tue May 17 01:26:46 MST 2005


On 16 May 2005, at 22:54, Jean-Denis Girard wrote:

> Andres Paglayan a écrit :
>
>> File::copy does copy, it re-writes the file,
>> you need to move it.
>> so when the the pointer is placed the file is already there.
>>
>
> Well from File::Copy man page, about the move() function:
> "If possible, move() will simply rename the file."

> I thought it was the case on Linux, but I'll probably change to  
> system(mv ...) just to be sure.
>

The 'if possible' thing relates to filesystem design.
Almost all of the native UNIX filesystems support mv as an atomic action
- but only within the same filesystem.
(Imagine you create the file on one physical disk then 'move' it
onto a different disk - the kernel has no option but to
copy the file).

So create your file in a temp directory on the _same_ file system as
the destination, then do the move.

If your filesystem is remote (samba or nfs) or non unix native (FAT)
then it just won't work.

Tim.


> Thanks for all the replies.
> Jean-Denis
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>




More information about the asterisk-users mailing list