#! /usr/bin/perl -w use strict; use diagnostics; while (1) { print "HERE\n"; open FH, "; close FH; print "D: $data\n"; for ( split /ROSE/, $data ? $data : '' ) { if ( /^RELOAD/ ) { } else { sleep 3; } } } # while 1 #### #! /usr/bin/perl -w use strict; use diagnostics; my $f = shift; for my $dir (1..20) { open (PIPE, ">pipe"); $dir = $f.'_'.$dir; $| = 1; select(PIPE); print STDOUT "$dir\n"; print PIPE "C,$dir,1ROSE"; close PIPE; sleep 1; } #### open FH, "<$config->{'pipe'}"; my $data = ; close FH; Log( { logfile => $log_file, text => 'trace: START: '. ( $data || '$data no val' ) }) if TRACE; #### if ( $has_files ) { my @now = gettimeofday; open FH, ">> /tmp/tmd_logs/DNOTIFY.LOG"; print FH format_time( $now[0] ).'.'.$now[1], " PREOPEN $dir\n"; close FH; open (PIPE, ">$pipe"); @now = gettimeofday; open FH, ">> /tmp/tmd_logs/DNOTIFY.LOG"; print FH format_time( $now[0] ).'.'.$now[1], " POSTOPEN $dir\n"; close FH; $| = 1; select(PIPE); eval { print PIPE "C,$dir,1ROSE"; }; $dirs{$dir}-- if $@; close PIPE; @now = gettimeofday; open FH, ">> /tmp/tmd_logs/DNOTIFY.LOG"; print FH format_time( $now[0] ).'.'.$now[1], " POSTCLOS $dir\n"; close FH; } #### 08:40:20.96244 PREOPEN /other/hosting/LIVE/127/out/3_304_127_21 08:40:20.96460 POSTOPEN /other/hosting/LIVE/127/out/3_304_127_21 08:40:20.96570 POSTCLOS /other/hosting/LIVE/127/out/3_304_127_21 08:40:20.96690 S: 14:35:51 H: 1 A: 08:31:06 M: 08:40:19 C: 08:40:19 SIG: 0 /other/hosting/LIVE/127/out/3_304_127_21 08:53:38.319388 PREOPEN /other/hosting/LIVE/127/out/3_304_127_21 08:53:38.319599 POSTOPEN /other/hosting/LIVE/127/out/3_304_127_21 08:53:38.319712 POSTCLOS /other/hosting/LIVE/127/out/3_304_127_21 08:53:38.319834 S: 08:40:19 H: 1 A: 08:53:32 M: 08:53:36 C: 08:53:36 SIG: 0 /other/hosting/LIVE/127/out/3_304_127_21 08:53:40.359719 S: 08:53:36 H: 0 A: 08:53:38 M: 08:53:38 C: 08:53:38 SIG: 0 /other/hosting/LIVE/127/out/3_304_127_21 #### 080411 07:40:17.514797 [8625] trace: START: C,/other/hosting/toxml/LIVE/273/out/1_128_1,1ROSE 080411 07:40:22.248450 [8625] trace: START: C,/other/hosting/LIVE/251/out/3_128_251_3,1ROSE