Click here to get back home

how to kill a spawned process when it hangs

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
how to kill a spawned process when it hangs dn_perl@hotmail.com 05-04-2005
Get Chitika Premium
Posted by dn_perl@hotmail.com on May 4, 2005, 4:10 am
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
kill the process July 7, 2006, 3:51 pm
how to kill a process initiated by system() October 27, 2004, 10:29 am
How to kill a forked child process... June 17, 2005, 7:26 pm
sending a kill to child process August 6, 2005, 11:26 am
kill the ssh process called by the system command January 22, 2006, 7:29 pm
kill process when file number reached... July 2, 2008, 2:45 pm
perl one-liners to search and kill process remotely May 2, 2006, 3:06 am
Parent process unable to read messages from child process February 28, 2007, 12:38 pm
Parent process unable to read messages from child process February 28, 2007, 12:38 pm
kill 0 July 26, 2005, 3:17 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap