]> git.lyx.org Git - features.git/blob - src/support/syscall.h
We don't currently use fork anywhere (or if we do it's by mistake!), so
[features.git] / src / support / syscall.h
1 // -*- C++ -*-
2 /**
3  *  \file syscall.h
4  *  Copyright 2002 the LyX Team
5  *  Read the file COPYING
6  *
7  * \author Asger Alstrup
8  *
9  * Interface cleaned up by
10  * \author Angus Leeming <a.leeming@ic.ac.uk>
11  *
12  * Class Systemcalls uses "system" to launch the child process.
13  * The user can choose to wait or not wait for the process to complete, but no
14  * callback is invoked upon completion of the child.
15  *
16  * The child process is not killed when the Systemcall instance goes out of
17  * scope.
18  */
19
20 #ifndef SYSCALL_H
21 #define SYSCALL_H
22
23 #include "LString.h"
24
25 #ifdef __GNUG__
26 #pragma interface
27 #endif
28
29 class Systemcalls {
30 public:
31         ///
32         enum Starttype {
33                 ///
34                 Wait,
35                 ///
36                 DontWait
37         };
38         
39         ///
40         Systemcalls() {}
41         
42         /** Generate instance and start child process.
43          *  The string "what" contains a commandline with arguments separated 
44          *  by spaces.
45          */
46         Systemcalls(Starttype how, string const & what);
47
48         /** Start child process.
49          *  This is for reuse of the Systemcalls instance.
50          */
51         int startscript(Starttype how, string const & what);
52 };
53
54 #endif // SYSCALL_H