blob: 2c3bc51d7b88e67ed3ece5ccabe966bac26bb77a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef _UTIL_H_
#define _UTIL_H_
#include <time.h>
#include <stdbool.h>
extern int _testmode;
struct user;
// Get monotonic clock (seconds)
time_t now();
void init_time();
bool doublefork();
bool waitRead( int fd, int ms );
void copy( const char *src, char *dst, size_t len, const char *stop );
void killSession( const struct user * user );
void redirect( int newIn, int newOut );
void switchUserSafe( const char* user );
void run( bool detach, const char *file, ... );
#endif
|