History

sox: exit with non-zero status on error [bug #212]

Mans Rullgard committed 6 years ago

Commit 4dd06661 parent 176a8381 file · +8 −3Browse files

Unified · Split

src/sox.c+8−3
@@ -2905,6 +2905,7 @@ int main(int argc, char **argv) · 2904 unmodified lines
2905{2905{
2906 size_t i;2906 size_t i;
2907 char mybase[6];2907 char mybase[6];
2908 int err;
2908 2909
2909 gettimeofday(&load_timeofday, NULL);2910 gettimeofday(&load_timeofday, NULL);
2910 myname = argv[0];2911 myname = argv[0];
@@ -3058,8 +3059,12 @@ int main(int argc, char **argv) · 147 unmodified lines
3058 read_user_effects(effects_filename);3059 read_user_effects(effects_filename);
3059 }3060 }
3060 3061
3061 while (process() != SOX_EOF && !user_abort && current_input < input_count)3062 for (;;) {
3062 {3063 err = process();
3064
3065 if (err == SOX_EOF || user_abort || current_input >= input_count)
3066 break;
3067
3063 if (advance_eff_chain() == SOX_EOF)3068 if (advance_eff_chain() == SOX_EOF)
3064 break;3069 break;
3065 3070
@@ -3102,5 +3107,5 @@ int main(int argc, char **argv) · 36 unmodified lines
3102 3107
3103 cleanup();3108 cleanup();
3104 3109
3105 return 0;3110 return !!err;
3106}3111}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t