in reply to Re: What is this process
in thread What is this process

Thanks! I think I have figured it out. I don't use a module. At EOF, I do a seek(IN, 0, 1) to reset EOF, and continue reading. I think it is the seek that is generating the processes. Quite a few more records are written to the log file that I am reading than I echo out. So, I probably do much more reading after hitting EOF. The timing makes sense. Also, I have another script that does a similar thing, except that it does not echo anything out. It has been running for a year. Never paid much attention to it. When I started watching for the perl processes on that box, it was doing the same thing. So the only thing in common between those two scripts is the seek. I think the fickle finger of fate is pointed squarely at the seek. Thanks again!

Replies are listed 'Best First'.
Re^3: What is this process
by soonix (Chancellor) on Sep 27, 2016 at 08:18 UTC
Re^3: What is this process
by shmem (Chancellor) on Sep 27, 2016 at 20:25 UTC
    I think it is the seek that is generating the processes.

    No. perl's seek doesn't imply spawning a new process. It boils down to a system call done in the same process, on my system (Linux) it is lseek(2).
    Does perl sport an echo function (see perlfunc)? There.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'