[cpl-plugin-xsh] 01/01: Replace exit() by abort() in shared libs

Ole Streicher olebole-guest at moszumanska.debian.org
Wed Dec 11 10:43:56 UTC 2013


This is an automated email from the git hooks/post-receive script.

olebole-guest pushed a commit to branch debian
in repository cpl-plugin-xsh.

commit 8100eabc63c1d07ace3090ec61b67619928453cc
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Wed Dec 11 11:43:52 2013 +0100

    Replace exit() by abort() in shared libs
---
 debian/patches/series                 |   1 +
 debian/patches/shlib-calls-exit.patch | 134 ++++++++++++++++++++++++++++++++++
 2 files changed, 135 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 79eeff7..be03ad7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ set_plugindir.patch
 use-std-paths-for-cpl.patch
 lapack.patch
 fix_typos.patch
+shlib-calls-exit.patch
diff --git a/debian/patches/shlib-calls-exit.patch b/debian/patches/shlib-calls-exit.patch
new file mode 100644
index 0000000..276fa24
--- /dev/null
+++ b/debian/patches/shlib-calls-exit.patch
@@ -0,0 +1,134 @@
+Author: Ole Streicher <debian at liska.ath.cx>
+Description: Replace exit() by abort() in shared libs.
+--- a/xsh/xsh_compute_response.c
++++ b/xsh/xsh_compute_response.c
+@@ -2890,7 +2890,7 @@
+     ncoeffs = 12;
+   } else {
+     xsh_msg("instrument arm not set");
+-    exit(0);
++    abort();
+   }
+   nbreak = ncoeffs + 2 - order;
+ 
+@@ -3400,7 +3400,7 @@
+   }
+  
+   //response_fit=xsh_bspline_interpol(response,phigh,instrument);
+-  //exit(0);
++  //abort();
+   /*
+   double* spline_fit=NULL; 
+   int i=0;
+--- a/xsh/xsh_create_master.c
++++ b/xsh/xsh_create_master.c
+@@ -373,7 +373,7 @@
+         xsh_pfits_set_qc_norm_fpn(preFrame->data_header,qc_fpn_val);
+         xsh_pfits_set_qc_norm_fpn_err(preFrame->data_header,qc_fpn_err);
+       }
+-  //exit(0);
++  //abort();
+   /* xsh_msg("DRS fpn=%g",qc_fpn_val); */
+ 
+  cleanup:
+--- a/xsh/xsh_model_anneal.c
++++ b/xsh/xsh_model_anneal.c
+@@ -233,7 +233,7 @@
+   /*  FILE * matchfile=fopen("match.dat","r");*/
+   if(measfile ==NULL ){
+     printf("Cannot open the measured coords file\n");
+-    exit(EXIT_FAILURE);}
++    abort();}
+ 
+   while(fscanf(measfile, "%d %lf %lf %d %lf %d %lf %d\n",
+                &meas_coord[feat_cnt].counter,
+@@ -249,7 +249,7 @@
+   fclose(measfile);
+   if (feat_cnt != sizearraywavelengths) {
+     printf("Number of spectral features is not equal to the number of wavelengths and slit posn's supplied! \n %d != %d \n",feat_cnt, sizearraywavelengths);
+-    exit(EXIT_FAILURE);}
++    abort();}
+ }
+ 
+ /*count lines of the calibration files in order to dimension the array's size.*/ 
+@@ -265,7 +265,7 @@
+   int linecounter=0;
+   if((myfile=fopen((char*)filename,"r"))==NULL){
+     printf("Cannot open file %s for reading.\n",filename);
+-    exit(EXIT_FAILURE);
++    abort();
+   }
+ 
+   do
+--- a/xsh/xsh_model_metric.c
++++ b/xsh/xsh_model_metric.c
+@@ -146,7 +146,7 @@
+ 
+   if ( xsh_SAInit(xsh_3_energy,nparam) == 0 ) {
+     fprintf(stderr,"trouble initializing in xsh_SAInit\n");
+-    exit(1);
++    abort();
+   }
+ 
+   local_p_abest=abest;
+--- a/xsh/xsh_model_r250.c
++++ b/xsh/xsh_model_r250.c
+@@ -243,14 +243,14 @@
+ 	if ( argc != 3 )
+ 	{
+ 		printf("Usage -- %s nmr_bins seed\n", argv[0]);
+-		exit(1);
++		abort();
+ 	}
+ 
+ 	nmr_bins = atoi( argv[1] );
+ 	if ( nmr_bins > MAX_BINS )
+ 	{
+ 		printf("ERROR -- maximum number of bins is %d\n", MAX_BINS);
+-		exit(1);
++		abort();
+ 	}
+ 
+ 	seed = atoi( argv[2] );
+@@ -261,7 +261,7 @@
+ 	{
+ 		for (j = 0; j < NMR_RAND; j++)
+ 			printf("%f\n", xsh_dr250() );
+-		exit(0);
++		abort();
+ 	}
+ 	
+ 	bin_inc = 1.0 / nmr_bins;
+--- a/xsh/xsh_utils_efficiency.c
++++ b/xsh/xsh_utils_efficiency.c
+@@ -1109,7 +1109,7 @@
+      //check(cpl_table_save(tbl_eff,plist, x_plist,name_eff, CPL_IO_DEFAULT));
+   }
+  
+-  //exit(0);
++  //abort();
+ 
+   xsh_msg("nclip_tot=%d",nclip_tot);
+   HIGH_ABS_REGION * phigh=NULL;
+--- a/xsh/xsh_utils_image.c
++++ b/xsh/xsh_utils_image.c
+@@ -1789,7 +1789,7 @@
+             j_stack += 2;
+             if (j_stack > PIX_STACK_SIZE) {
+                 xsh_msg_error("stack too small : aborting");
+-                exit(-2001) ;
++                abort() ;
+             }
+             if (ir-i+1 >= j-l) {
+                 i_stack[j_stack-1] = ir;
+--- a/xsh/xsh_model_io.c
++++ b/xsh/xsh_model_io.c
+@@ -695,7 +695,7 @@
+           (p_all_par+ii)->best>(p_all_par+ii)->max) {
+         printf("limits wrong in config file for parameter: %s \n",
+                (p_all_par+ii)->name);
+-        exit (EXIT_FAILURE);
++        abort();
+       }
+     }
+   }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cpl-plugin-xsh.git



More information about the debian-science-commits mailing list