mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-20 15:02:27 +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'.
|
||||
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* 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;
|
||||
|
||||
if(fork()==0) {
|
||||
int exit_code=system((cmd+" &").toUtf8());
|
||||
if(exit_code!=0) {
|
||||
rda->syslog(LOG_WARNING,
|
||||
"editor subprocess returned non-zero exit code %d [%s]",
|
||||
exit_code,strerror(errno));
|
||||
}
|
||||
RDCheckExitCode("RDCartDialog editor subprocess",
|
||||
system((cmd+" &").toUtf8()));
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,8 @@
|
||||
|
||||
#include <QDir>
|
||||
|
||||
#include <rdapplication.h>
|
||||
|
||||
#define RDCONF_FILE_SEPARATOR '/'
|
||||
|
||||
#include "rddb.h"
|
||||
@ -1185,3 +1187,22 @@ QList<pid_t> RDGetPids(const QString &program)
|
||||
|
||||
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 <QVariant>
|
||||
|
||||
#include <rdconfig.h>
|
||||
|
||||
/* Function Prototypes */
|
||||
int GetPrivateProfileBool(const char *,const char *,const char *,bool);
|
||||
int GetPrivateProfileString(const char *,const char *,const char *,char *,
|
||||
@ -110,5 +112,8 @@ bool RDModulesActive();
|
||||
QByteArray RDStringToData(const QString &str);
|
||||
QString RDStringToHex(const QString &str);
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user