@ -130,7 +130,7 @@ static options opts = {
static struct data data ;
/* only require an entry for name != NULL, otherwise a id as key is ok */
int readpwdent ( gchar * key , uid_t * uid , gid_t * gid , gchar * * name ) {
static int readpwdent ( gchar * key , uid_t * uid , gid_t * gid , gchar * * name ) {
struct passwd * pwd ;
errno = 0 ;
* gid = ( gid_t ) - 1 ;
@ -145,7 +145,7 @@ int readpwdent(gchar *key, uid_t *uid, gid_t *gid, gchar** name) {
return 0 ;
}
int readgrpent ( gchar * key , gid_t * gid ) {
static int readgrpent ( gchar * key , gid_t * gid ) {
struct group * grp ;
errno = 0 ;
if ( NULL = = ( grp = getgrnam ( key ) ) & & NULL = = ( grp = getgrgid ( atoi ( key ) ) ) ) {
@ -157,7 +157,7 @@ int readgrpent(gchar *key, gid_t *gid) {
return 0 ;
}
int create_sockaddr ( ) {
static int create_sockaddr ( ) {
if ( opts . addr ! = 0 & & opts . port = = 0 ) {
g_printerr ( " Specified address without port \n " ) ;
return - 1 ;
@ -196,7 +196,7 @@ int create_sockaddr() {
return 0 ;
}
int bind_socket ( ) {
static int bind_socket ( ) {
int s , val ;
/* Check if socket is already open */
@ -264,7 +264,7 @@ int bind_socket() {
return 0 ;
}
int open_pidfile ( ) {
static int open_pidfile ( ) {
if ( opts . pid_file ) {
struct stat st ;
if ( 0 = = ( data . pid_fd = open ( opts . pid_file , O_WRONLY | O_CREAT | O_EXCL | O_TRUNC , S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ) ) ) {
@ -294,7 +294,7 @@ int open_pidfile() {
return 0 ;
}
void prepare_env ( ) {
static void prepare_env ( ) {
GString * tmp ;
if ( - 1 ! = opts . php_childs ) {
tmp = g_string_sized_new ( 0 ) ;
@ -304,7 +304,7 @@ void prepare_env() {
}
}
int drop_priv ( ) {
static int drop_priv ( ) {
if ( data . i_am_root ) {
/* set user and group */
@ -368,7 +368,7 @@ int drop_priv() {
}
/* move a fd to another and close the old one */
void move2fd ( int srcfd , int dstfd ) {
static void move2fd ( int srcfd , int dstfd ) {
if ( srcfd ! = dstfd ) {
close ( dstfd ) ;
dup2 ( srcfd , dstfd ) ;
@ -377,11 +377,11 @@ void move2fd(int srcfd, int dstfd) {
}
/* replace an fd with /dev/null */
void move2devnull ( int fd ) {
static void move2devnull ( int fd ) {
move2fd ( open ( " /dev/null " , O_RDWR ) , fd ) ;
}
pid_t daemonize ( ) {
static pid_t daemonize ( ) {
pid_t child ;
int status ;
struct timeval tv = { 0 , 100 * 1000 } ;
@ -451,7 +451,7 @@ void start() {
exit ( errno ) ;
}
gboolean option_parse_address ( const gchar * option_name , const gchar * value , gpointer d , GError * * error ) {
static gboolean option_parse_address ( const gchar * option_name , const gchar * value , gpointer d , GError * * error ) {
UNUSED ( option_name ) ;
UNUSED ( d ) ;
UNUSED ( error ) ;
@ -514,7 +514,7 @@ int main(int argc, char **argv) {
if ( opts . show_version ) {
g_printerr ( PACKAGE_NAME " - " PACKAGE_VERSION " - spawns fastcgi processes \n " ) ;
g_printerr ( " Build : " PACKAGE _BUILD _DATE " \n " ) ;
g_printerr ( " Build -Date : " __DATE__ " " __TIME__ " \n " ) ;
return 0 ;
}