Re: Stopping phix
- Posted by irv Dec 26, 2020
- 1952 views
Calling system("ps -U irv axjf",0) as the last thing before ending the program (after calling gtk_main_quit) shows a difference which might explain why the window doesn't go away when the program ends. Notice there are two invocations of p test1, but only one with Eu.
7784 7791 7791 7791 pts/1 8162 Ss 1000 0:00 \_ bash 7791 8162 8162 7791 pts/1 8162 Sl+ 1000 0:00 \_ p test1 8162 8165 8162 7791 pts/1 8162 S+ 1000 0:00 \_ p test1 8165 8166 8162 7791 pts/1 8162 S+ 1000 0:00 \_ sh -c ps -U irv axjf 8166 8167 8162 7791 pts/1 8162 R+ 1000 0:00 \_ ps -U irv axjf 7784 7791 7791 7791 pts/1 8265 Ss 1000 0:00 \_ bash 7791 8265 8265 7791 pts/1 8265 Sl+ 1000 0:00 \_ eui test1 8265 8271 8265 7791 pts/1 8265 S+ 1000 0:00 \_ sh -c ps -U irv axjf 8271 8272 8265 7791 pts/1 8265 R+ 1000 0:00 \_ ps -U irv axjf
If you run the same program compiled by Phix (which exhibits the same misbehaviour as the interpreted version):
1 8618 1277 1277 ? -1 Sl 1000 0:00 /home/irv/pgtk/test1 8618 8622 1277 1277 ? -1 Z 1000 0:00 \_ [test1] <defunct> 8618 8625 1277 1277 ? -1 S 1000 0:00 \_ /home/irv/pgtk/test1 8625 8626 1277 1277 ? -1 S 1000 0:00 \_ sh -c ps -U irv axjf > PuOut.txt 8626 8627 1277 1277 ? -1 R 1000 0:00 \_ ps -U irv axjf