-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* js/exec-error-report: Improve error message when a transport helper was not found start_command: detect execvp failures early run-command: move wait_or_whine earlier start_command: report child process setup errors to the parent's stderr Conflicts: Makefile
- Loading branch information
Showing
5 changed files
with
191 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2009 Ilari Liusvaara | ||
# | ||
|
||
test_description='Test run command' | ||
|
||
. ./test-lib.sh | ||
|
||
test_expect_success 'start_command reports ENOENT' ' | ||
test-run-command start-command-ENOENT ./does-not-exist | ||
' | ||
|
||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* test-run-command.c: test run command API. | ||
* | ||
* (C) 2009 Ilari Liusvaara <ilari.liusvaara@elisanet.fi> | ||
* | ||
* This code is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include "git-compat-util.h" | ||
#include "run-command.h" | ||
#include <string.h> | ||
#include <errno.h> | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
struct child_process proc; | ||
|
||
memset(&proc, 0, sizeof(proc)); | ||
|
||
if (argc < 3) | ||
return 1; | ||
proc.argv = (const char **)argv+2; | ||
|
||
if (!strcmp(argv[1], "start-command-ENOENT")) { | ||
if (start_command(&proc) < 0 && errno == ENOENT) | ||
return 0; | ||
fprintf(stderr, "FAIL %s\n", argv[1]); | ||
return 1; | ||
} | ||
|
||
fprintf(stderr, "check usage\n"); | ||
return 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters