macd68, thanks very much. i had tried 'spawn' before, which works. but the problem is, because of the way in which code is written, using spawn is not possible. i'll have to do massive changes in the code.
is there any way to change to root user without spawning?
or, (this migh not entirely be...