3 * Copyright 2002 the LyX Team
4 * Read the file COPYING
6 * \author Asger Alstrup
8 * Interface cleaned up by
9 * \author Angus Leeming <a.leeming@ic.ac.uk>
11 * Class Systemcall uses "system" to launch the child process.
12 * The user can choose to wait or not wait for the process to complete, but no
13 * callback is invoked upon completion of the child.
15 * The child process is not killed when the Systemcall instance goes out of
22 #pragma implementation
25 #include "systemcall.h"
28 #include <cstdlib> //for ::system
32 Systemcall::Systemcall(Starttype how, string const & what)
34 startscript(how, what);
40 int Systemcall::startscript(Starttype how, string const & what)
42 string command = what;
44 if (how == DontWait) {
45 if (os::shell() == os::UNIX) {
48 command = "start /min/n " + command;
52 return ::system(command.c_str());