1

C++ process management: WinAPI "SetProcessShutdownParameters " in Linux?

view story
linux-howto

http://stackoverflow.com – In Windows (7), in VC++ we can set the "process shutdown parameters" (in XP a parent process will automatically shutdown before the child) to ensure a parent process is killed BEFORE a child process, like so: GetProcessShutdownParameters(&shutdownlevel, &shutdownflags); SetProcessShutdownParameters(shutdownlevel+1, SHUTDOWN_NORETRY); How to do this in C++ on Linux (gcc) ? I find a lot discussion in many forums on how to ensure a child process killed, in case a parent process dies (e.g. use of prctl on Linux), but I have found nothing on how to GUARANTEE that the parent process is kil (HowTos)