[Gllug] start sleeping processes from another VT?

Steve Nicholson steve.nicholson at yoursolutions.com
Tue Oct 9 15:06:12 UTC 2001


Great I like it when I have problems and learn things, one of the
reasons I like Linux, thanks for the explanation. Doing a strace they
are all in a "wait4(" state except the last one which is in "read(0,"
assuming I have done the strace correct.

The strace below is retyped from what I see on the other monitor.  The
"<unfinished ...>" appears after doing "ctrl-c" to stop the strace, I
assume it's not important in showing what is happening, included it in
case.  It appears each process is waiting for the next one "wait4(pid, "
(although I don't know what the "wait(-1, " is?), and the last one is
waiting for some sort of input "read(0, ".

Looking at the script that is running in the last process "sh
/var/lib/dpkg/info/locales.postinst", it's waiting for an "enter",
because that is the point you can "ctrl-z" to edit the config or
continue.
-----------bit-of-script--/var/lib/dpkg/info/locales.postinst---------

            if [ "$DEBIAN_FRONTEND" != noninteractive ]; then
                echo -n "Press [ENTER] to continue: "
                read FOO
            fi
-------end-bit-of-script--/var/lib/dpkg/info/locales.postinst---------

How can it send the process an "enter"?  It doesn't appear to be
responding to the keyboard on tty1.
I guess killing the last process 7098 will theoretically let the others
run on again?

thanks
Steve.

----from-"ps fx"-edited----------------------
  PID TTY      STAT   TIME COMMAND
  157 tty1     S      0:02 [dpkg-reconfigur]
  271 tty1     S      0:00 \_ [base-config.pos]
  340 tty1     S      1:07   \_ dselect
  341 tty1     S      0:00      \_ [install]
  344 tty1     S      0:03        \_ /usr/bin/apt-get -f dselect-upgrade
 7097 tty1     S      0:02          \_ /usr/bin/dpkg --configure locales
 7098 tty1     S      0:00            \_ sh
/var/lib/dpkg/info/locales.postinst
-----end-this-is-just-show-what-the-pids-are-----------

--strace's--------------
#strace -v -p 157
wait4(271,  <unfinished ...>

#strace -v -p 271
wait4(-1,  <unfinished ...>

#strace -v -p 340
--- SIGSTOP (Stopped (signal)) ---
wait4(341,  <unfinished ...>

#strace -v -p 341
wait4(-1,  <unfinished ...>

#strace -v -p 344
wait4(7097,  <unfinished ...>

#strace -v -p 7097
wait4(7098,  <unfinished ...>

#strace -v -p 7098
read(0,  <unfinished ...>

--end--strace's---------------



-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list