>> Aha. But this still does not terminate the vacfs, right ?
> 
> 
> Once you kill the script, you also kill the processes it created -  
> that's what process groups are, remember?

incorrect.  the script exits, it is not killed.  for example

        ; cat script
        #!/bin/rc
        rfork n
        sleep 1492&
        exit ''
        ; script
        ; ps -a|grep sleep
        quanstro       1519    0:00   0:00        8K Sleep    sleep 1492
        quanstro       1521    0:00   0:00      156K Pread    grep sleep

when the script exits, the channel is closed, since all
the writers are gone.  this means that when vacfs
read(2)'s from its 9p connection, it gets -1.  it is
conventional to exit at this point since no further
work may be done.

        ; cat script
        #!/bin/rc
        rfork n
        ramfs
        exit ''
        ; script
        ; ps -a | grep ramfs
        quanstro       1860    0:00   0:00      156K Pread    grep ramfs

- erik


Reply via email to