From: RedMary <mar...@gm...> - 2006-12-19 10:19:06
|
Hi, I'm trying to make two processes run next to eachother: the first runs a linux command in the shell (can take quite some time) that writes things to a file. The second process reads from that file at the same time in intervals and puts the text line for line in a grid. My problem is that I can't get these processes to work at the same time without causing my GUI to freeze. I tried several things, but keep running into problems: - I tried threads, but these cause the complete program to crash and return a segmentation fault. - I tried forking. This works quite well, except that when my child process (the shell command) is finished the process is not killed. The "exit" command returns a "free(): invalid pointer" error and the program does not return into the parent process. - I tried timer. This also almost works, except that I cannot stop my timer when I need to. Perhaps I'm calling the $timer->Stop; from the wrong place? I hope you can help me with this. Can you please post some simple code examples, because I'n not very good in object-oriented perl yet (I'm used to normal perl programming). Thanx in advance. -- View this message in context: http://www.nabble.com/Parallel-programming-of-processes-tf2845096.html#a7944688 Sent from the wxperl-users mailing list archive at Nabble.com. |