mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
better error handling for rigctld process
This commit is contained in:
parent
7d99f89911
commit
119c568ebe
27
gui/main.js
27
gui/main.js
|
@ -822,27 +822,24 @@ function close_all() {
|
|||
// RUN RIGCTLD
|
||||
ipcMain.on('request-start-rigctld',(event, data)=>{
|
||||
|
||||
|
||||
try{
|
||||
let rigctld_proc = spawn(data.path, data.parameters);
|
||||
|
||||
rigctld_proc.on('exit', function (code) {
|
||||
console.log('rigctld process exited with code ' + code);
|
||||
|
||||
// if rigctld crashes, error code is -2
|
||||
// then we are going to restart rigctld
|
||||
// this "fixes" a problem with latest rigctld on raspberry pi
|
||||
//if (code == -2){
|
||||
// setTimeout(ipcRenderer.send('request-start-rigctld', data), 500);
|
||||
//}
|
||||
//let rigctld_proc = spawn(data.path, data.parameters);
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
|
||||
rigctld_proc.on('exit', function (code) {
|
||||
console.log('rigctld process exited with code ' + code);
|
||||
|
||||
// if rigctld crashes, error code is -2
|
||||
// then we are going to restart rigctld
|
||||
// this "fixes" a problem with latest rigctld on raspberry pi
|
||||
//if (code == -2){
|
||||
// setTimeout(ipcRenderer.send('request-start-rigctld', data), 500);
|
||||
//}
|
||||
//let rigctld_proc = spawn(data.path, data.parameters);
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
const rigctld = exec(data.path, data.parameters);
|
||||
rigctld.stdout.on("data", data => {
|
||||
|
|
Loading…
Reference in a new issue