A review of the trace explains why the ps -ef | grep gzip command does not show the process. PID Time call() ... 5032 0.000079 fork() = 5236 <0.000252>.........."GZIP was executed at command line" 5032 0.000678 setpgid(5236, 5236) = 0 <0.000008> 5032 0.000130 rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0 <0.000007> ... 5032 0.000074 waitpid(-1, <unfinished ...>..........."man waitpid: -1 means wait on child" 5236 0.000322 --- SIGSTOP (Stopped (signal)) @ 0 (0) --- 5236 0.000078 getpid() = 5236 <0.000006> 5236 0.000050 rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0 <0.000007> 5236 0.000067 rt_sigaction(SIGTSTP, {SIG_DFL}, {SIG_IGN}, 8) = 0 <0.000009> 5236 0.000060 rt_sigaction(SIGTTIN, {SIG_DFL}, {SIG_IGN}, 8) = 0 <0.000007> 5236 0.000057 rt_sigaction(SIGTTOU, {SIG_DFL}, {SIG_IGN}, 8) = 0 <0.000007> 5236 0.000055 setpgid(5236, 5236) = 0 <0.000008> 5236 0.000044 rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [RTMIN], 8) = 0 <0.000007> 5236 0.000071 ioctl(255, TIOCSPGRP, [5236]) = 0 <0.000058> 5236 0.000102 rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0 <0.000007> 5236 0.000060 rt_sigaction(SIGINT, {SIG_DFL}, {0x8087030, [], SA_RESTORER, 0x4005aca8}, 8) = 0 <0.000007> 5236 0.000075 rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_IGN}, 8) = 0 <0.000007> 5236 0.000057 rt_sigaction(SIGTERM, {SIG_DFL}, {SIG_IGN}, 8) = 0 <0.000007> 5236 0.000058 rt_sigaction(SIGCHLD, {SIG_DFL}, {0x80776a0, [], SA_RESTORER, 0x4005aca8}, 8) = 0 <0.000007> 5236 0.000262 open("/tmp/named_pipe", O_RDONLY|O_LARGEFILE) = 3 <141.798572> 5236 141.798719 dup2(3, 0) = 0 <0.000008> 5236 0.000051 close(3) = 0 <0.000008> 5236 0.000167 open("/tmp/pipe.out.gz", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3 <0.000329> 5236 0.000394 dup2(3, 1) = 1 <0.000007> 5236 0.000042 close(3) = 0 <0.000008> 5236 0.000127 execve("/usr//bin/gzip", ["gzip"]
So 141.79 seconds after opening, the named pipe data was received, evecve() executed gzip, and the data was compressed and redirected to the file /tmp/pipe.out.gz. Only at this point would the gzip process show up in the ps listing. So what was initially thought to be a hung process is simply a sleeping process waiting on data.
|