FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 12-15-2011, 10:31 AM
Steven Whitehouse
 
Default fsck.gfs2: Use sigaction and not signal syscall

>From 97e49d3e55bcfce2fb2f8547528cf2f373e0843d Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Thu, 15 Dec 2011 10:36:51 +0000
Subject: [PATCH 1/2] fsck.gfs2: Use sigaction and not signal syscall

The signal syscall is obsolete and should not be used.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
gfs2/fsck/main.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gfs2/fsck/main.c b/gfs2/fsck/main.c
index d2a0965..aa354ad 100644
--- a/gfs2/fsck/main.c
+++ b/gfs2/fsck/main.c
@@ -228,6 +228,7 @@ int main(int argc, char **argv)
int j;
int error = 0;
int all_clean = 0;
+ struct sigaction act = { .sa_handler = interrupt, };

setlocale(LC_ALL, "");
textdomain("gfs2-utils");
@@ -247,7 +248,8 @@ int main(int argc, char **argv)
exit(FSCK_OK);
}

- signal(SIGINT, interrupt);
+ sigaction(SIGINT, &act, NULL);
+
log_notice( _("Starting pass1
"));
pass = "pass 1";
last_reported_block = 0;
--
1.7.4.4
 
Old 12-15-2011, 12:43 PM
Bob Peterson
 
Default fsck.gfs2: Use sigaction and not signal syscall

----- Original Message -----
| >From 97e49d3e55bcfce2fb2f8547528cf2f373e0843d Mon Sep 17 00:00:00
| >2001
| From: Steven Whitehouse <swhiteho@redhat.com>
| Date: Thu, 15 Dec 2011 10:36:51 +0000
| Subject: [PATCH 1/2] fsck.gfs2: Use sigaction and not signal syscall
|
| The signal syscall is obsolete and should not be used.
|
| Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| ---

Hi,

ACK,

Regards,

Bob Peterson
Red Hat File Systems
 

Thread Tools




All times are GMT. The time now is 05:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org