4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Asger Alstrup
9 * Interface cleaned up by
10 * \author Angus Leeming
12 * Full author contact details are available in file CREDITS.
27 * An instance of Class Systemcall represents a single child process.
29 * Class Systemcall uses system() to launch the child process.
30 * The user can choose to wait or not wait for the process to complete, but no
31 * callback is invoked upon completion of the child.
33 * The child process is not killed when the Systemcall instance goes out of
38 /// whether to wait for completion
40 Wait, //< wait for completion before returning from startscript()
41 DontWait //< don't wait for completion
44 /** Start child process.
45 * The string "what" contains a commandline with arguments separated
48 int startscript(Starttype how, std::string const & what);
53 * Outputs to the console terminal the line buffered standard output and
54 * error of a spawned process when there is a controlling terminal and
55 * stdout/stderr have not been redirected.
57 class ConOut : public QObject
61 ConOut(QProcess * proc);
64 /// Should the standard output be displayed?
65 void showout() { showout_ = true; }
67 /// Should the standard error be displayed?
68 void showerr() { showerr_ = true; }
71 /// Pointer to the process to monitor.
73 /// Index to the standard output buffer.
75 /// Index to the standard error buffer.
78 static size_t const bufsize_ = 200;
79 /// Standard output buffer.
80 char outdata_[bufsize_];
81 /// Standard error buffer.
82 char errdata_[bufsize_];
93 } // namespace support
96 #endif // SYSTEMCALL_H