gulya2005
31st January 2005, 13:41
Sorry, may be i do not understand.I want to kill parent process from child process, but child process must be activate.

en@frrom
31st January 2005, 13:56
Just write:
kill(parent)

The function kill(<process_id>) kills the specified process. The predefined variable 'parent' contains the pid of the parent process.

Good luck!!

En.

Hitesh Shah
1st February 2005, 15:43
Think just kill(parent) would also kill the child (including current process).

Maybe this thread (http://www.baanboard.com/baanboard/showthread.php?t=23023) helps.

en@frrom
1st February 2005, 15:46
Don't know where you take that from; by my experience kill(parent) kills the parent only. Did you try this?

Hitesh Shah
1st February 2005, 16:23
Not tested yet . Would like to test however for all zoomtypes like modal child dialog , modal dialog , modal without title etc . I would test the same and get back . In the meanwhile if you or anybody has clear results from experience, results can be shared here.

Also would like to know the value of the parent after killing . Is it set 0 .

NPRao
1st February 2005, 22:12
Don't know where you take that from; by my experience kill(parent) kills the parent only. Did you try this?

En,

That is true as long as the parent and child processes are in different/indepedent process groups like Synchornized sessions. It depends on how you have coded/used.

Refer to this thread for more information about wait().

Return Field for Calendar (http://www.baanboard.com/baanboard/showthread.php?t=9778&highlight=wait)
wait()
Syntax

string wait( ref long process_id, long option )
Description

This waits for one or all child processes to exit.
Arguments process_id

This returns the process number of the child process that exited. If no child
exited, it returns 0. If there are no child processes, or if all child processes
were already ended before the function was called, it returns -1.

option This can have one of the following values:

WTHANG

If the parent process ignores child signals (see signal()), the function waits
until all children have exited. The process_id argument returns the process ID
of the last child process to exit.

If the parent process does not ignore child signals (see signal()), the function
waits until one child exits. The process_id argument returns the process ID of
that child process.

WTNOHANG

If the parent process ignores child signals (see signal()), the function does
not block. If one or more child processes have previously exited and are in a
zombie state, the process_id argument returns the process of the last child
process that exited.

If the parent process does not ignore child signals (see signal()), the function
waits until one child exits. The process_id argument returns the process ID of
that child process.

Return values

The exit value (a string) of the child process identified by the process_id
argument.

If you make independent processes then you would be able to kill the parent process.

Refer to the thread -

Launching a Session from within a Session (http://www.baanboard.com/baanboard/showthread.php?t=22322&highlight=process)

The easier way to check is to see the process id's, groups and parent process ids from the start shell option.