ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/libptytty/src/ptytty_conf.h
Revision: 1.10
Committed: Mon May 30 20:44:01 2011 UTC (15 years, 4 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.9: +3 -2 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.2 /*
2 root 1.3 * This file contains a few tunables for libptytty. Normally there should
3     * be little reason to change this file. It is provided to suit rare or
4     * special cases only.
5     */
6    
7     /*
8 root 1.2 * Default mode to restore when releasing the PTS device. It is relaxed to be
9 root 1.1 * compatible with most systems, change it to a more secure value if your
10     * system supports it (0640 for example).
11     */
12     #define RESTORE_TTY_MODE 0666
13    
14     /*
15     * Define if you want to use a separate process for pty/tty handling
16     * when running setuid/setgid. You need this when making it setuid/setgid.
17     */
18     #define PTYTTY_HELPER 1
19    
20 root 1.2 /*
21 root 1.10 * Define if you want to use a single helper process from multiple threads
22 root 1.6 * OR forked processes. Without it, the helper will only work from the
23     * process having started it, and it might not be possible to start another
24 root 1.10 * helper. Having it disabled avoids a some syscalls and reduces codesize,
25     * but unless you are really short on cpu or memory, it's not worth disabling.
26 root 1.6 */
27 root 1.7 #define PTYTTY_REENTRANT 1
28 root 1.6
29     /*
30 root 1.4 * Provide a STL-like vector class and find algorithm.
31     * The default below fine for normal C++ environments.
32 root 1.2 */
33     #include <vector>
34 root 1.4 #include <algorithm>
35     using namespace std;
36 root 1.2
37 root 1.5 /*
38     * printf-like functions to be called on fatal conditions
39     * (must exit), or warning conditions (only print message)
40     * TODO move elsewhere, e.g. util.C
41     */
42 root 1.9 #define ptytty_fatal(msg) do { ptytty_warn ("%s", msg); _exit (1); } while (0)
43     #define ptytty_warn(msg,arg) fprintf (stderr, msg, arg) // TODO
44 root 1.8