Changeset 816
- Timestamp:
- 03/03/10 23:27:06 (14 years ago)
- Location:
- LATMOS-Accounts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/Makefile.PL
r813 r816 5 5 WriteMakefile( 6 6 NAME => 'LATMOS::Accounts', 7 VERSION => '0.0.1 8', # finds $VERSION7 VERSION => '0.0.19', # finds $VERSION 8 8 PREREQ_PM => { 9 9 'Net::LDAP' => undef, -
LATMOS-Accounts/bin/la-sync-manager
r694 r816 19 19 my $pidfile = undef; 20 20 21 $SIG{'HUP'} = sub {22 $needsync = 1;23 la_log LA_NOTICE, "SigHup received, synchronise now";24 };25 26 21 la_set_log( 27 22 syslog => [], … … 43 38 } 44 39 } 45 46 $SIG{INT} = sub {47 unlink($pidfile) if ($pidfile);48 exit 0;49 };50 40 51 41 if ($pidfile) { … … 86 76 } 87 77 78 $SIG{INT} = sub { 79 unlink($pidfile) if ($pidfile); 80 exit 0; 81 }; 82 83 $SIG{'HUP'} = sub { 84 $needsync = 1; 85 la_log LA_NOTICE, "SigHup received, synchronise now"; 86 }; 87 88 88 while (1) { 89 89 if ($needsync) { … … 93 93 $SIG{INT} = undef; 94 94 exit sync(); 95 } else { 96 while(waitpid($pid, 0) <= 0) {} 95 } 96 my $retpid; 97 while(($retpid = waitpid(-1, 0)) <= 0) {} 98 if ($retpid) { 97 99 my $res = $? << 8; 98 100 if ($res) { 99 la_log LA_ERR, "Sync process exit with $res"; 100 } 101 la_log LA_ERR, "Sync process exit with $res"; 102 } 103 next; 101 104 } 102 next;103 105 } 104 106
Note: See TracChangeset
for help on using the changeset viewer.