mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
fuse: use modern sigaction initialization for ignored signals
Signed-off-by: Susant Sahani <ssahani@redhat.com>
This commit is contained in:
@@ -98,7 +98,6 @@ main (int argc, char *argv[])
|
|||||||
int c, fd = -1;
|
int c, fd = -1;
|
||||||
int option_index;
|
int option_index;
|
||||||
const char *mountpoint;
|
const char *mountpoint;
|
||||||
struct sigaction sa;
|
|
||||||
struct pollfd pollfd;
|
struct pollfd pollfd;
|
||||||
char *error_str = NULL;
|
char *error_str = NULL;
|
||||||
size_t i;
|
size_t i;
|
||||||
@@ -165,11 +164,8 @@ main (int argc, char *argv[])
|
|||||||
ignore_value (chdir ("/"));
|
ignore_value (chdir ("/"));
|
||||||
|
|
||||||
/* Ignore keyboard signals. */
|
/* Ignore keyboard signals. */
|
||||||
memset (&sa, 0, sizeof sa);
|
sigaction(SIGINT, &(struct sigaction){ .sa_handler = SIG_IGN, .sa_flags = SA_RESTART }, NULL);
|
||||||
sa.sa_handler = SIG_IGN;
|
sigaction(SIGQUIT, &(struct sigaction){ .sa_handler = SIG_IGN, .sa_flags = SA_RESTART }, NULL);
|
||||||
sa.sa_flags = SA_RESTART;
|
|
||||||
sigaction (SIGINT, &sa, NULL);
|
|
||||||
sigaction (SIGQUIT, &sa, NULL);
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
pollfd.fd = fd;
|
pollfd.fd = fd;
|
||||||
|
|||||||
Reference in New Issue
Block a user