Use exit-status macros for compatibility 2/3
This commit is contained in:
parent
dbc0c54ced
commit
e76e18af96
@ -98,7 +98,7 @@ user_config_directory (int version)
|
||||
#endif
|
||||
if (home_dir.empty ()) {
|
||||
error << "Unable to determine home directory" << endmsg;
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
p = home_dir;
|
||||
|
||||
@ -119,7 +119,7 @@ user_config_directory (int version)
|
||||
if (g_mkdir_with_parents (p.c_str(), 0755)) {
|
||||
error << string_compose (_("Cannot create Configuration directory %1 - cannot run"),
|
||||
p) << endmsg;
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
} else if (!Glib::file_test (p, Glib::FILE_TEST_IS_DIR)) {
|
||||
fatal << string_compose (_("Configuration directory %1 already exists and is not a directory/folder - cannot run"),
|
||||
@ -156,7 +156,7 @@ user_cache_directory (std::string cachename)
|
||||
#endif
|
||||
if (home_dir.empty ()) {
|
||||
error << "Unable to determine home directory" << endmsg;
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
p = home_dir;
|
||||
|
||||
@ -187,7 +187,7 @@ user_cache_directory (std::string cachename)
|
||||
if (g_mkdir_with_parents (p.c_str(), 0755)) {
|
||||
error << string_compose (_("Cannot create cache directory %1 - cannot run"),
|
||||
p) << endmsg;
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
} else if (!Glib::file_test (p, Glib::FILE_TEST_IS_DIR)) {
|
||||
fatal << string_compose (_("Cache directory %1 already exists and is not a directory/folder - cannot run"),
|
||||
@ -209,7 +209,7 @@ ardour_dll_directory ()
|
||||
std::string s = Glib::getenv("ARDOUR_DLL_PATH");
|
||||
if (s.empty()) {
|
||||
std::cerr << _("ARDOUR_DLL_PATH not set in environment - exiting\n");
|
||||
::exit (1);
|
||||
::exit (EXIT_FAILURE);
|
||||
}
|
||||
return s;
|
||||
#endif
|
||||
|
@ -76,7 +76,7 @@ class DummyReceiver : public Receiver {
|
||||
std::cerr << prefix << str << std::endl;
|
||||
|
||||
if (chn == Transmitter::Fatal) {
|
||||
::exit (1);
|
||||
::exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -594,7 +594,7 @@ UI::process_error_message (Transmitter::Channel chn, const char *str)
|
||||
default:
|
||||
/* no choice but to use text/console output here */
|
||||
cerr << "programmer error in UI::check_error_messages (channel = " << chn << ")\n";
|
||||
::exit (1);
|
||||
::exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
errors->text().get_buffer()->begin_user_action();
|
||||
|
@ -77,7 +77,7 @@ PBD::open_uri (const char* uri)
|
||||
#else
|
||||
if (::vfork () == 0) {
|
||||
::execlp ("xdg-open", "xdg-open", s.c_str(), (char*)NULL);
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -962,7 +962,7 @@ SystemExec::start (StdErrMode stderr_mode, const char *vfork_exec_wrapper)
|
||||
char buf = 0;
|
||||
(void) ::write (pok[1], &buf, 1);
|
||||
close_fd (pok[1]);
|
||||
exit (-1);
|
||||
exit (EXIT_FAILURE);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ Transmitter::deliver ()
|
||||
sigemptyset (&mask);
|
||||
sigsuspend (&mask);
|
||||
/*NOTREACHED*/
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
/* JE - From what I can tell, the above code suspends
|
||||
* program execution until (any) signal occurs. Not
|
||||
* sure at the moment what this achieves, unless it
|
||||
|
Loading…
Reference in New Issue
Block a user