Re: [Nolug] Monitor incoming files and...

From: Jimmy Hess <>
Date: Sat, 23 Jun 2012 07:52:20 -0500
Message-ID: <>

On 6/22/12, Petri Laihonen <> wrote:
libiconv / PHP mb_convert_encoding are available as long as the
write PHP modules are installed or compiled in.

It would be ideal to inline all this logic with your upload process,
rather than run a separate daemon. You should have better
performance, and fewer chances for a race condition that way.
Process uploads to a temporary directory, then create a new second
temporary file,
delete the original, and move the converted file to a different directory
with an atomic rename() operation, to mark completion of the upload.

And don't tell the remote user the upload was successful until all
those operations succeeded.

> I would most likely do it with PHP script which would be running as daemon
> managed by supervisor. (i.e. PHP does not have to daemonize itself, since
> supervisor is doing it)

> P

Nolug mailing list
Received on 06/23/12

This archive was generated by hypermail 2.2.0 : 07/25/13 EDT