File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 203
203
204
204
END
205
205
{
206
- kill ' INT' , ` cat $kdc_pidfile ` if -f $kdc_pidfile ;
206
+ # take care not to change the script's exit value
207
+ my $exit_code = $? ;
208
+
209
+ kill ' INT' , ` cat $kdc_pidfile ` if defined ($kdc_pidfile ) && -f $kdc_pidfile ;
210
+
211
+ $? = $exit_code ;
207
212
}
208
213
209
214
note " setting up PostgreSQL instance" ;
Original file line number Diff line number Diff line change @@ -145,13 +145,18 @@ INIT
145
145
146
146
END
147
147
{
148
+ # take care not to change the script's exit value
149
+ my $exit_code = $? ;
150
+
148
151
foreach my $server (@servers )
149
152
{
150
153
next unless -f $server -> {pidfile };
151
154
my $pid = slurp_file($server -> {pidfile });
152
155
chomp $pid ;
153
156
kill ' INT' , $pid ;
154
157
}
158
+
159
+ $? = $exit_code ;
155
160
}
156
161
157
162
=pod
You can’t perform that action at this time.
0 commit comments