if(!$debug)exec($start_str.' > /dev/null 2>&1 &');// "> /dev/null 2>&1 &" makes sure it is really really run as a background job that does not wait for input
elseexec($start_str.$debug.' 2>&1 &');
for($i=0;$i<5;$i++){
if(is_file("/var/state/camogm.state"))break;
if(file_exists($cmd_pipe))
break;
sleep(1);
}
if($debug){
$fcmd=fopen($cmd_pipe,"w");
fprintf($fcmd,"debuglev=$debuglev");
fclose($fcmd);
}
// set fast recording mode if there is at least one suitable partition or revert to legacy 'mov' mode
alert("The higher the debug-level the more information is written to the debug file (it may slow down camogm and cause it to drop frames even if it could handle it with no/lower debug-level output).")
break;
case'fast_rec':
alert("Enable or disable fast recoding feature. The disk drive should have at least one partition without file system or"+
"any data on it to enable this feature.");
alert("Enable or disable fast recoding feature. The disk drive should have at least one partition without file system or"+
"any data on it to enable this feature. All subsequent data will be recorded to this partition with faster speed.");