1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Replace signal by sigaction

This commit is contained in:
Dave Davenport 2015-02-19 13:22:10 +01:00
parent d9db18266c
commit da8902ac88
5 changed files with 16 additions and 12 deletions

View file

@ -2,6 +2,7 @@
Removed features:
- Remove (broken) hmode
- Old style key binding and mode launcher.
- Old TIMING code.
New features:
- Word movement in entry box. (#126)
- PID file to avoid duplicate Rofi.

View file

@ -22,12 +22,12 @@ typedef struct
typedef enum
{
TB_AUTOHEIGHT = 1 << 0,
TB_AUTOWIDTH = 1 << 1,
TB_LEFT = 1 << 16,
TB_RIGHT = 1 << 17,
TB_CENTER = 1 << 18,
TB_EDITABLE = 1 << 19,
TB_AUTOHEIGHT = 1 << 0,
TB_AUTOWIDTH = 1 << 1,
TB_LEFT = 1 << 16,
TB_RIGHT = 1 << 17,
TB_CENTER = 1 << 18,
TB_EDITABLE = 1 << 19,
} TextboxFlags;

View file

@ -170,8 +170,8 @@ static char ** get_apps_external ( char **retv, unsigned int *length, unsigned i
*/
static char ** get_apps ( char **retv, unsigned int *length )
{
unsigned int num_favorites = 0;
char *path;
unsigned int num_favorites = 0;
char *path;
if ( getenv ( "PATH" ) == NULL ) {
return NULL;

View file

@ -114,9 +114,9 @@ static int ssh_sort_func ( const void *a, const void *b )
}
static char ** get_ssh ( unsigned int *length )
{
unsigned int num_favorites = 0;
char *path;
char **retv = NULL;
unsigned int num_favorites = 0;
char *path;
char **retv = NULL;
if ( getenv ( "HOME" ) == NULL ) {
return NULL;

View file

@ -1715,7 +1715,10 @@ int main ( int argc, char *argv[] )
}
// Set up X interaction.
signal ( SIGCHLD, catch_exit );
const struct sigaction sigchld_action = {
.sa_handler = catch_exit
};
sigaction ( SIGCHLD, &sigchld_action, NULL );
x11_setup ( display );