summaryrefslogtreecommitdiff
path: root/ext/POSIX
diff options
context:
space:
mode:
authorBrendan O'Dea <bod@debian.org>2002-09-04 12:36:10 +1000
committerhv <hv@crypt.org>2002-09-04 13:47:12 +0000
commit557c0de77f34a6b3bb86c0e3be82c255a426eb96 (patch)
tree57b4934bd0a9e201ec4f7cba4f601222784bfe0d /ext/POSIX
parent0b9ee88a2cad759969ed3dc0c9b21cd58a60351d (diff)
downloadperl-557c0de77f34a6b3bb86c0e3be82c255a426eb96.tar.gz
Re: [PATCH 5.8.0] add accessors for POSIX::SigAction
From: "Brendan O'Dea" <bod@debian.org> Message-ID: <20020903163610.GA14595@londo.odea.dropbear.id.au> p4raw-id: //depot/perl@17839
Diffstat (limited to 'ext/POSIX')
-rw-r--r--ext/POSIX/POSIX.pm15
-rw-r--r--ext/POSIX/POSIX.pod15
2 files changed, 27 insertions, 3 deletions
diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm
index 05634f0132..5a1cbb9392 100644
--- a/ext/POSIX/POSIX.pm
+++ b/ext/POSIX/POSIX.pm
@@ -51,9 +51,12 @@ sub AUTOLOAD {
goto &$AUTOLOAD;
}
-sub POSIX::SigAction::new {
- bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0}, $_[0];
-}
+package POSIX::SigAction;
+
+use AutoLoader 'AUTOLOAD';
+sub new { bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0}, $_[0] }
+
+package POSIX;
1;
__END__
@@ -948,3 +951,9 @@ for (values %EXPORT_TAGS) {
require Exporter;
}
+
+package POSIX::SigAction;
+
+sub handler { $_[0]->{HANDLER} = $_[1] if @_ > 1; $_[0]->{HANDLER} };
+sub mask { $_[0]->{MASK} = $_[1] if @_ > 1; $_[0]->{MASK} };
+sub flags { $_[0]->{FLAGS} = $_[1] if @_ > 1; $_[0]->{FLAGS} };
diff --git a/ext/POSIX/POSIX.pod b/ext/POSIX/POSIX.pod
index 286df40ec1..cea5eca36e 100644
--- a/ext/POSIX/POSIX.pod
+++ b/ext/POSIX/POSIX.pod
@@ -1594,6 +1594,21 @@ function.
=back
+=over 8
+
+=item handler
+
+=item mask
+
+=item flags
+
+accessor functions to get/set the values of a SigAction object.
+
+ $sigset = $sigaction->mask;
+ $sigaction->flags(&POSIX::SA_RESTART);
+
+=back
+
=head2 POSIX::SigSet
=over 8