![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
King of Portal
|
I'd like to know how I can run the same script twice (on the command line or even in my browser) so that I can get overlapping outputs on my windows machine. So, for instance if the script were something simplistic like the following:[PHP]<?php
while(true){ fwrite(STDOUT, "Process ID: " . getmypid() . "\n"); sleep(1); } ?>[/PHP]The output in the command line would be something along the lines of: Process ID: 3894 Process ID: 3894 Process ID: 3894 Process ID: 2295 Process ID: 3894 Process ID: 2295 ...
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Feb 2006
Location: Ohio
Posts: 93
Rep Power: 3
![]() |
I would probably write a Perl script (on windows) that creates one or more child processes that each connect to the given URL and download the results to a local, temporary, HTML file. Then, if possible, the script would display the local pages in my default browser for me.
But, why do you want to do this?
__________________
Neeley.org |
|
|
|
|
|
#3 |
|
King of Portal
|
I wanted to do this to test a file locking mechanism. I was actually just sort of hoping it would be some sort of command line input I had to enter. I just opened up to command prompts and typed in the same command, ALT+TAB really quick and got some overlapping instructions. Not the most efficient way to look at the output lol but it JUST met the requirements. Needless to say the file-locking mechanism I was trying to implement didn't work.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 328
Rep Power: 4
![]() |
Sadly the Windows command-line shell is a bit restrictive. Hailing from the days of non-multitasking OSes it doesn't spawn background processes conveniently like Unix shells do. Even its I/O redirection is still pretty poor. I pity people stuck developing and testing on Win32 - it's such a weird, archaic system.
__________________
"I'm not a genius. Why do I have to suffer?" |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| understanding scripts | Special T | Delphi | 0 | Oct 24th, 2006 9:26 PM |