Package: libipc-run-perl
Version: 20220807.0-1

I've noticed that IPC::Run::run() sometimes takes significantly more time than the child process itself. For example:

   $ time -p perl -MIPC::Run=run -e "run('sleep 0.7')"
   real 1.18
   user 0.03
   sys 0.01

This is how it looks under strace:

   $ strace -T -e trace=pselect6 perl -MIPC::Run=run -e "run('sleep 0.7')"
   [ Process PID=8271 runs in 32 bit mode. ]
   pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=100000}, NULL) = 0 (Timeout) 
<0.000164>
   pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=100000}, NULL) = 0 (Timeout) 
<0.000161>
   pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=100000}, NULL) = 0 (Timeout) 
<0.000160>
   ...
   pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=100000}, NULL) = 0 (Timeout) 
<0.000248>
   pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=100000}, NULL) = 0 (Timeout) 
<0.000212>
   pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=500000000}, NULL) = ? 
ERESTARTNOHAND (To be restarted if no handler) <0.031700>
   --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8272, si_uid=1000, 
si_status=0, si_utime=0, si_stime=0} ---
   pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=468403068}, NULL) = 0 (Timeout) 
<0.469205>
   +++ exited with 0 +++

So there's nearly half a second delay after the child exits.


-- System Information:
Architecture: i386

Versions of packages libipc-run-perl depends on:
ii  perl            5.34.0-5
ii  libio-pty-perl  1:1.15-2+b1

--
Jakub Wilk

Reply via email to