Click here to get back home

Fork, processes and exit codes?

 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
Fork, processes and exit codes? <joe_Lucy1107354790266560xd4ba 02-03-2005
Get Chitika Premium
Posted by <joe_Lucy1107354790266560xd4ba on February 3, 2005, 2:36 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
backtick and system return different exit codes December 25, 2005, 9:06 pm
Possible bug in 5.8.6: accept/fork/wait/exit ? June 5, 2005, 8:29 pm
Killing all child processes upon parent exit November 30, 2005, 8:58 pm
Using fork() on XP to run processes in parallel May 2, 2005, 2:45 pm
fork off several children processes August 27, 2007, 5:36 pm
A problem with fork() and managing processes December 1, 2004, 1:49 pm
perl fork() problem: child exit() kills parent November 25, 2005, 5:34 pm
In a Perl script 'exit 1' returns exit status 0! December 8, 2006, 1:07 pm
how to "see" DOS errorlevel codes? January 15, 2007, 12:17 pm
Help writing semaphore codes July 12, 2007, 5:27 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap