void stopSystem(void) { puts("\nThe system has shutdown. Please reboot or power off."); for(;;) _asm hlt; }
in persistent memory and process0 gets "stopSystem" as termination address?
The question is how to determine whether the teminating process is process 0?
I see now! Your suggestion is good and I answered my question too! I discovered a global variable called "cu_psp" whose parent is used in the exec_user() call at the end of return_user(). This is still somewhat misty to me, but perhaps all we have to do is set the Int 22h termination address of the shell's PSP to stopSystem and it'll be executed automatically when it ends! Am I right?
Lucho
------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel