mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-20 23:03:04 +02:00
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
* Added 'RDCheckExitCode()' functions in 'lib/rdconf.[cpp|h]. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
8b19d28c17
commit
fb50414428
@ -21760,3 +21760,5 @@
|
|||||||
* Cleaned up compile warning in 'lib/rdcae.cpp'.
|
* Cleaned up compile warning in 'lib/rdcae.cpp'.
|
||||||
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
|
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Cleaned up compile warning in 'lib/rdcart_dialog.cpp'.
|
* Cleaned up compile warning in 'lib/rdcart_dialog.cpp'.
|
||||||
|
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added 'RDCheckExitCode()' functions in 'lib/rdconf.[cpp|h].
|
||||||
|
@ -310,12 +310,8 @@ void RDCartDialog::editorData()
|
|||||||
delete q;
|
delete q;
|
||||||
|
|
||||||
if(fork()==0) {
|
if(fork()==0) {
|
||||||
int exit_code=system((cmd+" &").toUtf8());
|
RDCheckExitCode("RDCartDialog editor subprocess",
|
||||||
if(exit_code!=0) {
|
system((cmd+" &").toUtf8()));
|
||||||
rda->syslog(LOG_WARNING,
|
|
||||||
"editor subprocess returned non-zero exit code %d [%s]",
|
|
||||||
exit_code,strerror(errno));
|
|
||||||
}
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
|
#include <rdapplication.h>
|
||||||
|
|
||||||
#define RDCONF_FILE_SEPARATOR '/'
|
#define RDCONF_FILE_SEPARATOR '/'
|
||||||
|
|
||||||
#include "rddb.h"
|
#include "rddb.h"
|
||||||
@ -1185,3 +1187,22 @@ QList<pid_t> RDGetPids(const QString &program)
|
|||||||
|
|
||||||
return pids;
|
return pids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int RDCheckExitCode(const QString &msg,int exit_code)
|
||||||
|
{
|
||||||
|
if(exit_code!=0) {
|
||||||
|
rda->syslog(LOG_WARNING,"%s returned non-zero exit code %d [%s]",
|
||||||
|
msg.toUtf8().constData(),exit_code,strerror(errno));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int RDCheckExitCode(RDConfig *config,const QString &msg,int exit_code)
|
||||||
|
{
|
||||||
|
if(exit_code!=0) {
|
||||||
|
RDApplication::syslog(config,LOG_WARNING,
|
||||||
|
"%s returned non-zero exit code %d [%s]",
|
||||||
|
msg.toUtf8().constData(),exit_code,strerror(errno));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
#include <QSqlDatabase>
|
#include <QSqlDatabase>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
|
#include <rdconfig.h>
|
||||||
|
|
||||||
/* Function Prototypes */
|
/* Function Prototypes */
|
||||||
int GetPrivateProfileBool(const char *,const char *,const char *,bool);
|
int GetPrivateProfileBool(const char *,const char *,const char *,bool);
|
||||||
int GetPrivateProfileString(const char *,const char *,const char *,char *,
|
int GetPrivateProfileString(const char *,const char *,const char *,char *,
|
||||||
@ -110,5 +112,8 @@ bool RDModulesActive();
|
|||||||
QByteArray RDStringToData(const QString &str);
|
QByteArray RDStringToData(const QString &str);
|
||||||
QString RDStringToHex(const QString &str);
|
QString RDStringToHex(const QString &str);
|
||||||
QList<pid_t> RDGetPids(const QString &program);
|
QList<pid_t> RDGetPids(const QString &program);
|
||||||
|
int RDCheckExitCode(const QString &msg,int exit_code);
|
||||||
|
int RDCheckExitCode(RDConfig *config,const QString &msg,int exit_code);
|
||||||
|
|
||||||
|
|
||||||
#endif // RDCONF_H
|
#endif // RDCONF_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user