Windows Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsWindows Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 1st, 2003, 08:47 AM
txgirlta txgirlta is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 12 txgirlta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Submitting a program in the background

How do I submit an executable to run in the background from the command line? On unix, all you have to do is append a '&' to the program on the command line, and it will run in background. Is there such a simple way to also do so on XP?

Thanks

Reply With Quote
  #2  
Old October 1st, 2003, 12:30 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 184
This is default for windows. If you want to wait for the program to quit, you need extra effort.

Dos programs in a window are different though (I guess that's your case?). Afaik it is impossible then because DOS did not have this function. They used TSR programs, but you had to write the program yourself. This mechanism can't be applied to existing programs.

hth,
M.
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #3  
Old October 1st, 2003, 02:22 PM
txgirlta txgirlta is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 12 txgirlta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Well, that is 'sort of' my case! I actually posed this question (much more detailed) on the PHP forum, and they moved it here! I am trying to execute a windows program which writes to stdout/stderr, with a system() PHP statement in PHP code running on a browser using Apache on my XP box. The PHP system() command executes my program, which runs for over a minute wall clock, and the PHP page times out. Now, I don't WANT the PHP page to wait for the program to finish, I just want it to push it into the system to run in background, then continue on. That way the page won't time out in the browser.

I was lectured to by the PHP forum that my question wasn't a PHP question, but a Windows question, thus why it was pushed to this forum.

So, that is the whole story of this question! Does your reply 'imply' that I just cannot run a background task on a Windows platform from PHP?

THANX!

Last edited by txgirlta : October 1st, 2003 at 02:24 PM.

Reply With Quote
  #4  
Old October 2nd, 2003, 01:02 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 184
Windows does not have the feature of background tasks.
I didn't test it, but you can start programs in a new window via "start <programname>". This would be the equivalent to background tasks in unix.
If it has no effect, setup your web server to allow access to the console (in the services settings of the control panel) so it can open new windows.
But I doubt this will work at all. One out of many reasons why IMO one should not choose windows for running a web server.

hth,
M.

Reply With Quote
  #5  
Old October 2nd, 2003, 08:10 AM
txgirlta txgirlta is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 12 txgirlta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the suggestion about "start <programname>", I will try that, and cross my fingers!

I TOTALLY agree about your statement about running a web server on Windows - and, ultimately, this web server will be on a linux platform - but the web app I'm writing needs to be portable enough to be run on a laptop that is running XP (this webapp makes its 'debut' as a demo at a tradeshow next week! argggh - deadlines!!!!!), so I am 'trying' to make it as generic as possible (and with as simple capability as possible) so that it can run on both a linux or a windows web-server. I have the Apache server running like a champ on the laptop, as well as mySQL and php, and the webapp itself. The only hitch is this job submission problem!!!!

I have faith in myself that I will find 'some' sort of resolution - just hope I can find it by tomorrow (or at latest, Sunday!!!!)

Thanks to everyone for their help!

Tricia

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsWindows Help > Submitting a program in the background


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT