This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Run program in background.

At Sunday, October 03, 2004 6:24 PM, Moises Deangelo wrote:
> Please
> I did a program in C.
> That program needs to run for a long time, because of this it is ideal
> that he works on background.
> I do not have been managing do that.
>  is there some command? Any lib, anything
> I thank the help.
> Moises Deangelo.

It is not clear that what I wrote below is what you really want.  But in
case it is ...

If you want to write a program that puts itself in the background, I can't
help you.  But if you want to just run it in the background ...

Open a new console/bash window.
Start the program.
Continute your work in other windows.
(Note: This is not really running in the background, but it has the same
effect: start a program and continue with other work.)

Start the program like this:
	$ program &
(Note: You won't be able to exit from that shell until program finishes.)


If you use bash as your shell:
Start the program.
	$ program
Stop the program by hitting control-Z.
Put the program in the background
	$ bg
Other shells with job control can do similar things, though the specifics
may vary.
(Note: This is equivalent to (2).  Also, you won't be able to exit from that
shell until program finishes.)

Investigate cygstart.exe.  See
	$  cygstart --help

If you have X installed, inventigate run.exe.

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]