Hello everyone,

I'm trying to write a script, i would like to say the child process will kill the parent process

how would i do that?

Thanx,

Recommended Answers

All 3 Replies

uuuuuup

> how would i do that?
Why is also a question as well.

Are you figuring that if you can assassinate your parent, that you'll be adopted by root?

if you know you want the parent to die immediately, then use the builtin exec function: exec replaces the parent process with a process running the exec-ed command.

If you want to kill the parent process only sometimes, or only later, you should probably re-think what you actually need, or how best to do it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.