]> git.lyx.org Git - lyx.git/blob - src/support/systemcall.C
"Inter-word Space"
[lyx.git] / src / support / systemcall.C
1 /**
2  *  \file systemcall.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Asger Alstrup
7  *
8  * Interface cleaned up by
9  * \author Angus Leeming
10  *
11  * Full author contact details are available in file CREDITS
12  */
13
14 #include <config.h>
15
16 #include "systemcall.h"
17 #include "os.h"
18
19 #include <cstdlib>
20
21 #ifndef CXX_GLOBAL_CSTD
22 using std::system;
23 #endif
24
25 // Reuse of instance
26 int Systemcall::startscript(Starttype how, string const & what)
27 {
28         string command = what;
29
30         if (how == DontWait) {
31                 if (os::shell() == os::UNIX) {
32                         command += " &";
33                 } else {
34                         command = "start /min/n " + command;
35                 }
36         }
37
38         return ::system(command.c_str());
39 }