Hi,
To execute pan/pan with option "-p" will occurs Segmentation fault.
Here is the example,
----------------------------------------
[EMAIL PROTECTED]:~/ltp/ltp$ pan.orig/pan -n ex1 echo hello -p
hello
<<<test_start>>>
tag=cmdln stime=1211018279
cmdline="echo hello "
contacts=""
analysis=exit
initiation_status="ok"
<<<test_output>>>
incrementing stop
<<<execution_status>>>
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=0
<<<test_end>>>
Segmentation fault
--------------------------------------
The reason is that it not appends the "-l" option to pan to open the
"logfile" for writing log.
Just add a condition judgement to fix it.
Signed-off-by: Jin Bing Guo <[EMAIL PROTECTED]>
--------
diff -ruNp pan.orig/pan.c pan/pan.c
--- pan.orig/pan.c 2008-05-17 17:47:30.000000000 +0800
+++ pan/pan.c 2008-05-17 17:54:01.000000000 +0800
@@ -577,7 +577,7 @@ main(int argc, char **argv)
++exit_stat;
}
fclose(zoofile);
- if (fmt_print)
+ if (logfile && fmt_print)
{
if (uname(&unamebuf) == -1)
fprintf(stderr, "ERROR: uname(): %s\n", strerror(errno));
Best regards!
Jin Bing Guo 郭晋兵
-------------------------------------
"To be professional ..."
-- A killer said.-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list