]> git.lyx.org Git - lyx.git/blob - src/support/systemcall.h
another safety belt
[lyx.git] / src / support / systemcall.h
1 // -*- C++ -*-
2 /**
3  *  \file systemcall.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Asger Alstrup
8  *
9  * Interface cleaned up by
10  * \author Angus Leeming
11  *
12  * Full author contact details are available in file CREDITS
13  */
14
15 #ifndef SYSTEMCALL_H
16 #define SYSTEMCALL_H
17
18 #include "LString.h"
19
20 #ifdef __GNUG__
21 #pragma interface
22 #endif
23
24 /**
25  * An instance of Class Systemcall represents a single child process.
26  *
27  * Class Systemcall uses system() to launch the child process.
28  * The user can choose to wait or not wait for the process to complete, but no
29  * callback is invoked upon completion of the child.
30  *
31  * The child process is not killed when the Systemcall instance goes out of
32  * scope.
33  */
34 class Systemcall {
35 public:
36         /// whether to wait for completion
37         enum Starttype {
38                 Wait, //< wait for completion before returning from startscript()
39                 DontWait //< don't wait for completion
40         };
41
42         /** Start child process.
43          *  The string "what" contains a commandline with arguments separated
44          *  by spaces.
45          */
46         int startscript(Starttype how, string const & what);
47 };
48
49 #endif // SYSTEMCALL_H