user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH 0/2] minor bugfixes
@ 2016-02-28 23:59 Eric Wong
  2016-02-28 23:59 ` [PATCH 1/2] newswww: set Content-Type properly Eric Wong
  2016-02-28 23:59 ` [PATCH 2/2] spawnpp: die instead of exit on exec failure Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2016-02-28 23:59 UTC (permalink / raw)
  To: meta

Eric Wong (2):
      newswww: set Content-Type properly
      spawnpp: die instead of exit on exec failure

 lib/PublicInbox/NewsWWW.pm | 2 +-
 lib/PublicInbox/SpawnPP.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] newswww: set Content-Type properly
  2016-02-28 23:59 [PATCH 0/2] minor bugfixes Eric Wong
@ 2016-02-28 23:59 ` Eric Wong
  2016-02-28 23:59 ` [PATCH 2/2] spawnpp: die instead of exit on exec failure Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2016-02-28 23:59 UTC (permalink / raw)
  To: meta

Oops :x
---
 lib/PublicInbox/NewsWWW.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/NewsWWW.pm b/lib/PublicInbox/NewsWWW.pm
index e19765c..dfc0021 100644
--- a/lib/PublicInbox/NewsWWW.pm
+++ b/lib/PublicInbox/NewsWWW.pm
@@ -43,7 +43,7 @@ sub call {
 
 		return [ $code, $h, [ "Redirecting to $url\n" ] ]
 	}
-	[ 404, [ 'Content-Length' => 'text/plain' ], [] ];
+	[ 404, [ 'Content-Type' => 'text/plain' ], [] ];
 }
 
 sub ng_mid_for {
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] spawnpp: die instead of exit on exec failure
  2016-02-28 23:59 [PATCH 0/2] minor bugfixes Eric Wong
  2016-02-28 23:59 ` [PATCH 1/2] newswww: set Content-Type properly Eric Wong
@ 2016-02-28 23:59 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2016-02-28 23:59 UTC (permalink / raw)
  To: meta

Perl may complain about exit not being executed, but not die.
---
 lib/PublicInbox/SpawnPP.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/SpawnPP.pm b/lib/PublicInbox/SpawnPP.pm
index 1a402e4..288625d 100644
--- a/lib/PublicInbox/SpawnPP.pm
+++ b/lib/PublicInbox/SpawnPP.pm
@@ -25,7 +25,7 @@ sub public_inbox_fork_exec ($$$$$$) {
 			$ENV{$k} = $v;
 		}
 		exec @$cmd;
-		exit 1;
+		die "exec $cmd->[0] failed: $!\n";
 	}
 	$pid;
 }
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-28 23:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-28 23:59 [PATCH 0/2] minor bugfixes Eric Wong
2016-02-28 23:59 ` [PATCH 1/2] newswww: set Content-Type properly Eric Wong
2016-02-28 23:59 ` [PATCH 2/2] spawnpp: die instead of exit on exec failure Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).