in reply to system @args problem

I doubt that the script "cannot notice the sub-process has done". More probably the process forked off with system does never actually return. In which case you may set up a timeout. This is usually done through eval and alarm. You should get plenty of examples by doing a search, so it's not worth repeating any here. If you have any specific problem, then ask again.

PS: now that we told you 'bout eval, please use it only as necessary, and do not abuse it, especially in its string form, it's often frowned upon as Bad(TM), and there are good reasons why it is!