Changeset 11233

Show
Ignore:
Timestamp:
08/18/08 15:24:48 (5 months ago)
Author:
/C=ES/O=Warp Networks S.L./CN=ejhernandez@…
Message:

Added watcher when the incoming directory is deleted refs #1103

Location:
branches/remote-services/ebox/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/remote-services/ebox/src/EBox/RemoteServices/Server/t/jobReceiver.t

    r11232 r11233  
    4242} 
    4343 
    44 my $jobId = 1; 
     44my $jobId = 12321; 
    4545my $args  = 'test1'; 
    4646my @coolParams = (jobId => $jobId, 
     
    7474_testCmd($cmd, $jobDirPath, $args); 
    7575 
    76 #system("rm -rf $jobDirPath"); 
     76system("rm -rf $jobDirPath"); 
  • branches/remote-services/ebox/src/libexec/ebox-runnerd

    r11232 r11233  
    120120 
    121121$inotify->watch(INCOMING_DIR, IN_CREATE, $incomingSub); 
     122$inotify->watch(INCOMING_DIR, IN_DELETE_SELF, sub {}); 
    122123# Run those directories which have not run previously 
    123124_runRemainder(); 
     
    128129        last; 
    129130    } 
    130     $_->{w}{cb} foreach(@events); 
     131    foreach my $evt (@events) { 
     132        if ( $evt->IN_DELETE_SELF ) { 
     133            EBox::warn(INCOMING_DIR . " has been deleted! Stopping daemon..."); 
     134            exit(0); 
     135        } 
     136        $evt->{w}{cb}; 
     137    } 
    131138} 
    132139