exit - perl script is not terminating after finishing -
i calling perl script using xinetd port. observed file not terminated automatically after finishing. pasting code of file below.
#! /usr/bin/perl -w use warnings; use time::piece; use dbi; use diagnostics; $env{tz} = 'asia/kolkata'; $today = localtime->strftime(); # local time zone $todaysecs = localtime->epoch(); # local time in secs(total secs) $line = <stdin>; #input xinetd $line =~ s/^\s+//; $line =~ s/\s+$//; if($line ne "") { $connet_db = dbi->connect('dbi:mysql:db_name','db_user','db_password'); $connet_db->do("insert `table_name` (`column1` , `column2`, `data_time`) values ('$line', '$today', $todaysecs)"); $connet_db->disconnect(); }
i pasting output of cmd shows processes not terminated.
14848 /usr/bin/perl -w /home/abhi 48:34 15225 /usr/bin/perl -w /home/abhi 46:02 15836 /usr/bin/perl -w /home/abhi 43:31 16160 /usr/bin/perl -w /home/abhi 40:56 16777 /usr/bin/perl -w /home/abhi 38:24 16948 /usr/bin/perl -w /home/abhi 37:02 17107 /usr/bin/perl -w /home/abhi 36:37 17269 /usr/bin/perl -w /home/abhi 35:51 17702 /usr/bin/perl -w /home/abhi 33:16 17876 /usr/bin/perl -w /home/abhi 32:00 18270 /usr/bin/perl -w /home/abhi 30:40 18678 /usr/bin/perl -w /home/abhi 28:09
please me figure out problem.
Comments
Post a Comment