handy tip #502

Guido van Rossum guido at mcvax.UUCP
Fri Aug 5 00:54:58 AEST 1983


   "Your .profile or .login file won't work correctly if it has non-builtin
    commands in it, but that's OK.  Once logged in, have the shell STOP the
    processes as above and kill them."

Your .login may work, but at least here (4.1c BSD) .profile gets you in
serious trouble.  I guessed it worked as follows: the shell tries to fork
and gets an error.  It assumes the system's process table is full, sleeps
some time and tries to fork again; forever.  Now if you interrupt it,
it dies very soon.  Why?  We saw the answer to that in recent discussions
on sleep(): during the sleep(), sh's interrupt catcher brings it back to its
main loop, but when the alarm goes off it dies (either of the signal or
because of the wild longjmp).  [All this is speculation, I didn't have
the time to look in the code.]

Guido van Rossum, Math. Centre, Amsterdam, {philabs,decvax}!mcvax!guido



More information about the Comp.unix.wizards mailing list