From: "Kent Fredric" <kentfredric@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: scripts/
Date: Thu, 16 Feb 2012 00:26:35 +0000 (UTC) [thread overview]
Message-ID: <1316676401.96e36ba5d7a32ff510915d54b089386554466986.kent@gentoo> (raw)
commit: 96e36ba5d7a32ff510915d54b089386554466986
Author: Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Wed Sep 21 10:14:06 2011 +0000
Commit: Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Thu Sep 22 07:26:41 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=96e36ba5
[scripts] make multiplex script +x
[scripts] make error conditions in ssh_multiplex script clearer
---
scripts/ssh_multiplex.pl | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/scripts/ssh_multiplex.pl b/scripts/ssh_multiplex.pl
old mode 100644
new mode 100755
index a83cd62..cb3d4c9
--- a/scripts/ssh_multiplex.pl
+++ b/scripts/ssh_multiplex.pl
@@ -77,20 +77,26 @@ sub map_param {
sub spawn_child {
my (@cmd) = @_;
+ local $!;
+ local $?;
+ local $@;
my $cleanup = pop @cmd;
my $pid;
if ( not defined( $pid = fork() ) ) {
- my (@error) = ( $!, $?, $@ );
+ my (%error) = ( '$!', $!, '$?', $?, '$@', $@ );
require Carp;
- Carp::croak("Forking Failed :( @error ");
+ Carp::croak( 'Forking Failed :( ' . dump \%error );
}
if ($pid) {
return $pid;
}
+ local $!;
+ local $?;
+ local $@;
system(@cmd) == 0 or do {
- my (@error) = ( $!, $?, $@ );
+ my (%error) = ( '$!', $!, '$?', $?, '$@', $@ );
require Carp;
- Carp::croak("Running command Failed :( @error ");
+ Carp::croak( 'Running command Failed :( ' . dump \%error );
};
$cleanup->();
exit;
next reply other threads:[~2012-02-16 0:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 0:26 Kent Fredric [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-02-16 0:27 [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: scripts/ Kent Fredric
2012-02-16 0:27 Kent Fredric
2012-02-16 0:26 Kent Fredric
2012-02-16 0:26 Kent Fredric
2012-02-16 0:26 Kent Fredric
2012-02-16 0:26 Kent Fredric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1316676401.96e36ba5d7a32ff510915d54b089386554466986.kent@gentoo \
--to=kentfredric@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox