On 2009-02-13, Christian Heimes wrote:
> David schrieb:
>> Hi everyone,
>>
>> I copied a program from C to track multiple log files. I would like to
>> be able to print a label when a log file is updated. Here is the program;
>
> Don't use threads for the job. On Unix the preferred way is select(
Joe Riopel wrote:
On Fri, Feb 13, 2009 at 12:03 PM, David wrote:
Hi everyone,
I copied a program from C to track multiple log files. I would like to be
able to print a label when a log file is updated. Here is the program;
Since you're calling tail itself, why not just use tail's ability to
On Fri, Feb 13, 2009 at 12:03 PM, David wrote:
> Hi everyone,
>
> I copied a program from C to track multiple log files. I would like to be
> able to print a label when a log file is updated. Here is the program;
Since you're calling tail itself, why not just use tail's ability to
tail multiple f
David schrieb:
> Hi everyone,
>
> I copied a program from C to track multiple log files. I would like to
> be able to print a label when a log file is updated. Here is the program;
Don't use threads for the job. On Unix the preferred way is select()'ing
or poll()'ing multiple file descriptors.
C
Hi everyone,
I copied a program from C to track multiple log files. I would like to
be able to print a label when a log file is updated. Here is the program;
#!/usr/bin/python
from threading import Thread
import subprocess
from Queue import Queue
num_threads = 3
queue = Queue()
logfiles = ["