[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: timeouts, zombies, and shellcommands
From: |
Darrell Fuhriman |
Subject: |
Re: timeouts, zombies, and shellcommands |
Date: |
Thu, 11 Oct 2001 16:07:51 -0700 |
User-agent: |
Mutt/1.3.15i |
> One thing that has me confused is why it seems to be waiting on
> PID 89, instead of '-1', or the actual PID of the child (1370).
> I smell a bug of some sort... especially in light of the fact
> that it does correctly wait for the previous command's PID.
So, I did some more checking -- just to compound the confusion, I have
another machine (different hardware), which executes the exact same code
just fine. :(
However, on the strace output from that machine, I see:
15:53:29.562269 rt_sigaction(SIGALRM, {0x4002c8c0, [ALRM],
SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
15:53:29.562331 alarm(30) = 0
15:53:29.562369 umask(077) = 022
15:53:29.562404 pipe([24, 25]) = 0
15:53:29.562461 fork() = 1551
15:53:29.563124 close(25) = 0
15:53:29.563188 fcntl64(24, F_GETFL) = 0 (flags O_RDONLY)
15:53:29.563260 fstat64(24, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
15:53:29.563333 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x402e9000
15:53:29.563390 _llseek(24, 0, 0xbfff3940, SEEK_CUR) = -1 ESPIPE (Illegal seek)
15:53:29.563502 read(24, 0x402e9000, 4096) = ? ERESTARTSYS (To be restarted)
15:53:29.570752 --- SIGCHLD (Child exited) ---
15:53:29.570780 read(24, "error reading information on ser"..., 4096) = 70
15:53:29.570867 read(24, "", 4096) = 0
15:53:29.570910 close(24) = 0
15:53:29.570952 munmap(0x402e9000, 4096) = 0
15:53:29.571001 wait4(1076793344, 0xbfffdb0c, 0, NULL) = -1 ECHILD (No child
processes)
15:53:29.571040 alarm(0) = 30
Note that here, also, the wait4() is being called on a bogus pid -- only
this time the correct thing happens, and ECHILD is returned.
I would also point out that on every single consecutive wait4(), the exact
same pid is used as the argument.
15:53:29.560383 wait4(1076793344, 0xbfffdb0c, 0, NULL) = -1 ECHILD (No child
processes)
15:53:29.571001 wait4(1076793344, 0xbfffdb0c, 0, NULL) = -1 ECHILD (No child
processes)
15:53:29.575566 wait4(1076793344, 0xbfffdb0c, 0, NULL) = -1 ECHILD (No child
processes)
15:53:29.588233 wait4(1076793344, 0xbfffdb0c, 0, NULL) = -1 ECHILD (No child
processes)
15:53:38.109800 wait4(1076793344, 0xbfffdb0c, 0, NULL) = -1 ECHILD (No child
processes)
15:53:38.122506 wait4(1076793344, 0xbfffdb0c, 0, NULL) = -1 ECHILD (No child
processes)
15:53:38.132982 wait4(1076793344, 0xbfffdb0c, 0, NULL) = -1 ECHILD (No child
processes)
15:53:38.143593 wait4(1076793344, 0xbfffdb0c, 0, NULL) = -1 ECHILD (No child
processes)
15:53:38.148391 wait4(1076793344, 0xbfffdb0c, 0, NULL) = -1 ECHILD (No child
processes)
That can't be right.
Darrell