in reply to Re^2: Behavior of threads on XP-- system() works, backtic & popen don't...
in thread Behavior of threads on XP-- system() works, backtic & popen don't...
Strange. I created the four data files required and ran your code as is and it produced the following output (I've wrapped the numbers onto single lines to save screen space!):
c:\test>555304 Thread 1 Thread 2 Thread 3 Thread 4 Via system: 1 2 3 4 5 6 7 8 9 Via system: 1 2 3 4 5 6 7 8 9 Via system: 1 2 3 4 5 6 7 8 9 Via system: 1 2 3 4 5 6 7 8 9 Via backticks 1 2 3 4 5 6 7 8 9 Via backticks 1 2 3 4 5 6 Via backticks 1 2 3 4 5 6 7 8 9 7 8 9 Via backticks 1 2 3 4 5 6 7 8 9 Via pipe 1 2 3 4 5 6 7 8 9 Via pipe 1 2 3 4 5 6 7 8 9 Via pipe 1 2 3 4 5 6 7 8 9 Via pipe 1 2 3 4 5 6 7 8 9
As you can see, all four threads ran all 3 methods without problems. The "sorted" output is a little mixed up as you might expect with four threads all outputting to the screen concurrently, but no hangs or errors. I did this with AS811 and AS817 with the same results. I don't have AS813 installed, but I do not expect it to fail, but if it is, the answer is to upgrade.
If upgrading doesn't fix your problem, then we'll need to look more closely at your environment to try and understand what is broken on your system/installation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Behavior of threads on XP-- system() works, backtic & popen don't...
by Sync (Initiate) on Jun 15, 2006 at 16:49 UTC | |
by BrowserUk (Patriarch) on Jun 16, 2006 at 12:15 UTC | |
by Sync (Initiate) on Jun 16, 2006 at 17:23 UTC | |
by BrowserUk (Patriarch) on Jun 16, 2006 at 18:04 UTC | |
by Sync (Initiate) on Jun 16, 2006 at 21:54 UTC | |
| |
by ww (Archbishop) on Jun 16, 2006 at 18:29 UTC | |
by Sync (Initiate) on Jun 16, 2006 at 22:06 UTC |