"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xinetd/intcommon.c" between
xinetd-2.3.15.tar.gz and xinetd-2.3.15.4.tar.xz

About: xinetd is a secure replacement for inetd, the internet services daemon (openSUSE fork).

intcommon.c  (xinetd-2.3.15):intcommon.c  (xinetd-2.3.15.4.tar.xz)
skipping to change at line 37 skipping to change at line 37
void int_fail( const struct intercept_s *ip, const char *lsyscall ) void int_fail( const struct intercept_s *ip, const char *lsyscall )
{ {
msg( LOG_ERR, "fail", "%s failed: %m", lsyscall ) ; msg( LOG_ERR, "fail", "%s failed: %m", lsyscall ) ;
(*ip->int_ops->exit)() ; (*ip->int_ops->exit)() ;
/* NOTREACHED */ /* NOTREACHED */
} }
/* /*
* Returns either a positive number or -1 * Returns either a positive number or -1
*/ */
#ifdef HAVE_POLL
int int_poll( int pfds_last, struct pollfd *pfd_array )
{
const char *func = "int_poll" ;
#else
int int_select( int max, fd_set *read_mask ) int int_select( int max, fd_set *read_mask )
{ {
const char *func = "int_select" ; const char *func = "int_select" ;
#endif
for ( ;; ) for ( ;; )
{ {
int n_ready ; int n_ready ;
n_ready = select( max+1, read_mask, do {
FD_SET_NULL, FD_SET_NULL, TIMEVAL_NULL ) ; #ifdef HAVE_POLL
n_ready = poll( pfd_array, pfds_last, -1 );
#else
n_ready = select( max+1, read_mask,
FD_SET_NULL, FD_SET_NULL, TIMEVAL_NULL ) ;
#endif
} while (n_ready == -1 && errno == EINTR);
if ( n_ready > 0 ) if ( n_ready > 0 )
return( n_ready ) ; return( n_ready ) ;
else if ( n_ready == -1 ) { #ifdef HAVE_POLL
if ( errno == EINTR ) msg( LOG_ERR, func, "poll: %m" ) ;
continue ; #else
else msg( LOG_ERR, func, "select: %m" ) ;
{ #endif
msg( LOG_ERR, func, "select: %m" ) ; return( -1 ) ;
return( -1 ) ;
}
}
} }
} }
void int_exit( struct intercept_s *ip ) void int_exit( struct intercept_s *ip )
{ {
int status = SERVER_EXITSTATUS( INT_SERVER( ip ) ) ; int status = SERVER_EXITSTATUS( INT_SERVER( ip ) ) ;
const char *func = "int_exit" ; const char *func = "int_exit" ;
if ( debug.on ) if ( debug.on )
{ {
 End of changes. 4 change blocks. 
11 lines changed or deleted 21 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)