blob: 2c3bc51d7b88e67ed3ece5ccabe966bac26bb77a (
plain) (
tree)
|
|
#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
|