Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29281 Discussions

How to Proceed without Waiting for the Completion of a Sub-task?

tom_c_lin
Beginner
1,283 Views

Hi Everyone,

My program makes the following system call to start a sub-task, i.e., run prog.exe.

prog.exe datafile.dat

The calling program always wait until the completion of the sub-task before it proceeds. Can any of you show me how to make the calling program proceeds without waiting ? Thanks in advance. Good Day.

Tom Lin

0 Kudos
4 Replies
anthonyrichards
New Contributor III
1,283 Views
Try ShellExecuteEx. I would have posted some code, but I have just found that 
I cannot paste anything into this blasted window!

					
				
			
			
				
			
			
			
			
			
			
			
		
0 Kudos
hajek
Beginner
1,283 Views
Hi Tom,
Try executing (through SYSTEM)
'start prog.exe datafile.dat' (which launchs a separate cmd shell window)
or
'start /B prog.exe datafile.dat' (which doesn't, useful for windows GUI app)

0 Kudos
Steven_L_Intel1
Employee
1,283 Views

Example of ShellExecute

You can paste with CTRL-V or the Paste icon in the editing toolbar (third from left in bottom row.) For pasting code, use the icon on the far right of the bottom row.)

0 Kudos
tom_c_lin
Beginner
1,283 Views

Thank you all for prompt replies. The command 'start /B' is what I am looking for. Because our programs are triggered by activities on Sun, we have to use Window Service. Creating a window to run will not work. Thanks again. The forum has been extremely helpful to my project. I really appreciate that.

Tom Lin

0 Kudos
Reply