Hi guys,<BR>
<BR>
I am currently writing my first wxperl program. What I am doing is ta=
king a user selection of a source dir and a destination dir and am taring u=
p the source dir to the destination dir.<BR>
<BR>
I am executing tar via "system", then calling a progressdialog which I upda=
te by having established the size of the source files, and watching the siz=
e of the destination file grow. When the destination file is the same=
size or bigger than the source files, the dialog completes and I destroy i=
t.<BR>
<BR>
I am forking a child to execute tar via system, so that the parent can cont=
inue on, open the progress dialog and monitor things. I have attached=
the relevant subroutine. I don't do this often, so the code might be a bit=
messy.<BR>
<BR>
Two things:<BR>
<BR>
1 - when the taring finishes, the child exits, the progress dialog is destr=
oyed but the main window isn't usable. it is like the main window is =
still the destroyed progress dialog. Why?<BR>
<BR>
2 - I can cancel the progressdialog, but need to send a message to the chil=
d to quit early. I understand, however, that using "system" to call t=
ar will create a child of its own. So I need the parent, to tell the =
child, to tell system to die. The child, once system has returned, wi=
ll exit anyway. How can I accomplish that? At this stage, I hav=
e tried to kill the child (just to see what happens), but the whole program=
dies. System doesn't return a process ID. I could get a proces=
s listing, but that isn't cross platform and I want to be able to run more =
than one instance of this program, so I don't want to kill just ANY tar pro=
cess.<BR>
<BR>
Can anyone help? i realise the problem is less wxperl, and more perl itself=
, but I figure people have written code here that monitors processes.<BR>
<BR>
Thanks.<BR>
<BR>
Evan Read.<BR>
<BR>
<BR>=
|