fixing alternc_shutdown bug
This commit is contained in:
parent
81aae4c2f4
commit
c96f928056
|
@ -36,9 +36,7 @@ getFields($fields);
|
|||
|
||||
|
||||
$p=$bro->GetPrefs();
|
||||
// need to release the giant lock, otherwise those downloads will hang
|
||||
// AlternC for all users!
|
||||
alternc_shutdown();
|
||||
|
||||
switch ($p["downfmt"]) {
|
||||
case 0:
|
||||
$bro->DownloadTGZ($dir);
|
||||
|
|
|
@ -52,23 +52,6 @@ Merci de revenir plus tard.";
|
|||
}
|
||||
/* */
|
||||
|
||||
/* Toutes les pages du bureau passent ici. On utilise une s<EFBFBD>maphore pour
|
||||
s'assurer que personne ne pourra acc<EFBFBD>der <EFBFBD> 2 pages du bureau en m<EFBFBD>me temps.
|
||||
*/
|
||||
/* * /
|
||||
// 1. Get a semaphore id for the alternc magic number (18577)
|
||||
$alternc_sem = sem_get ( 18577 );
|
||||
// 2. Declare the shutdown function, that release the semaphore
|
||||
function alternc_shutdown() {
|
||||
global $alternc_sem;
|
||||
@sem_release( $alternc_sem );
|
||||
}
|
||||
// 3. Register the shutdown function
|
||||
register_shutdown_function("alternc_shutdown");
|
||||
// 4. Acquire the semaphore : with that process,
|
||||
sem_acquire( $alternc_sem );
|
||||
/* */
|
||||
|
||||
if (ini_get("safe_mode")) {
|
||||
echo "SAFE MODE IS ENABLED for the web panel ! It's a bug in your php or apache configuration, please fix it !!";
|
||||
exit();
|
||||
|
|
|
@ -1165,9 +1165,6 @@ class m_bro {
|
|||
}
|
||||
$timestamp=date("H:i:s");
|
||||
|
||||
// relacher le lock global sinon ce download va geler alternc pour
|
||||
// tout le monde
|
||||
alternc_shutdown();
|
||||
if(exec("/bin/tar cvf - ".getuserpath()."/ | gzip -9c > ".$dir."/".$mem->user['login']."_html_".$timestamp.".tar.gz")){
|
||||
$err->log("bro","export_data_succes");
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue