Forking in windows. Possible?

D

dakman

I know under mac/*nix it's possible to fork the proccess to the
background and exit the parent process. I have used this on a couple of
my projects, but right now I am working on a project that will be
required to run in the background, I have considered using the .pyw
extension on my files, but there will be parts of the program that will
be required to show the console. So if anyone has an ideas...

-Thanks
 
G

Gabriel Genellina

(e-mail address removed) ha escrito:
I know under mac/*nix it's possible to fork the proccess to the
background and exit the parent process. I have used this on a couple of
my projects, but right now I am working on a project that will be
required to run in the background, I have considered using the .pyw
extension on my files, but there will be parts of the program that will
be required to show the console. So if anyone has an ideas...

The usual way for Windows background processes that need user
interaction, is to provide an icon in the Taskbar Notification Area
(next to the clock). You can look at the win32gui_taskbar demo in the
pywin32 package.
 
R

robert

I know under mac/*nix it's possible to fork the proccess to the
background and exit the parent process. I have used this on a couple of
my projects, but right now I am working on a project that will be
required to run in the background, I have considered using the .pyw
extension on my files, but there will be parts of the program that will
be required to show the console. So if anyone has an ideas...

-Thanks

"Background" has not much meaning on Win as long as not another process is waiting for return. And you obviously want to click an icon in Explorer.

If you don't need the data memory status of the current process inherited, CreateProcess would be most similar.

Then there is win32console.GetConsoleWindow , ShowWindow(SW_HIDE), win32console.AllocConsole, win32ui.CreateEdit, taskbar functions, win32service
etc.


Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top